lib/sidekiq/throttled/strategy/concurrency.rb in sidekiq-throttled-0.6.4 vs lib/sidekiq/throttled/strategy/concurrency.rb in sidekiq-throttled-0.6.5

- old
+ new

@@ -42,21 +42,21 @@ @key_suffix || @limit.respond_to?(:call) end # @return [Boolean] whenever job is throttled or not def throttled?(jid, *job_args) - 1 == SCRIPT.eval([key(job_args), jid.to_s], [limit(job_args), @ttl]) + 1 == SCRIPT.eval([key(job_args)], [jid.to_s, limit(job_args), @ttl]) end # @return [Integer] Current count of jobs def count(*job_args) Sidekiq.redis { |conn| conn.scard(key(job_args)) }.to_i end # Resets count of jobs # @return [void] def reset!(*job_args) - Sidekiq.redis { |conn| conn.del(key(job_args)) }.to_i + Sidekiq.redis { |conn| conn.del(key(job_args)) } end # Remove jid from the pool of jobs in progress # @return [void] def finalize!(jid, *job_args)