lib/sidekiq/throttled/queues_pauser.rb in sidekiq-throttled-0.10.0.alpha vs lib/sidekiq/throttled/queues_pauser.rb in sidekiq-throttled-0.10.0.beta
- old
+ new
@@ -1,9 +1,10 @@
# frozen_string_literal: true
require "set"
require "singleton"
+require "concurrent/timer_task"
require "sidekiq/throttled/patches/queue"
require "sidekiq/throttled/communicator"
require "sidekiq/throttled/queue_name"
@@ -53,10 +54,10 @@
config.on(:startup) { start_watcher }
config.on(:quiet) { stop_watcher }
@communicator.receive(PAUSE_MESSAGE, &method(:add))
@communicator.receive(RESUME_MESSAGE, &method(:delete))
- @communicator.ready(&method(:sync!))
+ @communicator.ready { sync! }
end
end
# Returns queues list with paused queues being stripped out.
#