lib/sidekiq/throttled.rb in sidekiq-throttled-0.1.0 vs lib/sidekiq/throttled.rb in sidekiq-throttled-0.2.0
- old
+ new
@@ -1,5 +1,6 @@
+# frozen_string_literal: true
# 3rd party
require "sidekiq"
# internal
require "sidekiq/version"
@@ -58,10 +59,10 @@
message = JSON.parse message
job = message.fetch("class".freeze) { return false }
jid = message.fetch("jid".freeze) { return false }
Registry.get job do |strategy|
- return strategy.throttled? jid
+ return strategy.throttled?(jid, *message["args"])
end
false
rescue
false