lib/jobs_autoscaling/monitor.rb in inst-jobs-autoscaling-1.0.1 vs lib/jobs_autoscaling/monitor.rb in inst-jobs-autoscaling-1.0.2

- old
+ new

@@ -3,21 +3,21 @@ module JobsAutoscaling class Monitor IDLE = :idle BUSY = :busy - def initialize(action: action) + def initialize(action: ) @action = action end def activate! Delayed::Worker.lifecycle.after(:work_queue_pop, &method(:work_queue_pop)) change_state(IDLE) end protected - def work_queue_pop(work_queue) + def work_queue_pop(work_queue, _worker_config) unless work_queue.respond_to?(:all_workers_idle?) return end new_state = work_queue.all_workers_idle? ? IDLE : BUSY