Sha256: 53117db13f252fa2d3cf477fff0fe0a94fd1aa86f0c7a004c1cbb568cc884cd8

Contents?: true

Size: 614 Bytes

Versions: 2

Compression:

Stored size: 614 Bytes

Contents

require 'sidekiq/limit_fetch'
require 'celluloid/autostart'
require 'sidekiq/fetch'

RSpec.configure do |config|
  config.before :each do
    Sidekiq.redis do |it|
      clean_redis = ->(queue) do
        it.pipelined do
          it.del "limit_fetch:limit:#{queue}"
          it.del "limit_fetch:busy:#{queue}"
          it.del "limit_fetch:probed:#{queue}"
          it.del "limit_fetch:pause:#{queue}"
          it.del "limit_fetch:block:#{queue}"
        end
      end

      clean_redis.call(name) if defined?(name)
      queues.each(&clean_redis) if defined?(queues) and queues.is_a? Array
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sidekiq-limit_fetch-2.0 spec/spec_helper.rb
sidekiq-limit_fetch-1.7 spec/spec_helper.rb