Sha256: 3c77eb6afb9adb945602d9abe0c0eb2ab4f6bb1e4d92a459fb9907705229bd9e

Contents?: true

Size: 303 Bytes

Versions: 20

Compression:

Stored size: 303 Bytes

Contents

# frozen_string_literal: true

module SidekiqHelpers
  def clear_sidekiq_jobs_and_locks
    # Drop sidekiq-unique-jobs locks
    MOCK_REDIS.keys.each do |key|
      MOCK_REDIS.del(key)
    end

    # Clear sidekiq queues and workers
    Sidekiq::Queues.clear_all
    Sidekiq::Worker.clear_all
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
global-registry-bindings-0.6.2 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.6.1 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.6.0 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.5.0 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.4.0 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.3.3 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.3.2 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.3.1 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.3.0 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.2.0 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.1.9 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.1.8 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.1.7 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.1.6 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.1.5 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.1.4 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.1.3 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.1.2 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.1.1 spec/helpers/sidekiq_helpers.rb
global-registry-bindings-0.1.0 spec/helpers/sidekiq_helpers.rb