Answers for "cancel queue by class sidekiq"

0

cancel queue by class sidekiq

queue = Sidekiq::Queue.new("mailer")
queue.each do |job|
  job.klass # => 'MyWorker'
  job.args # => [1, 2, 3]
  job.delete if job.jid == 'abcdef1234567890'
end
Posted by: Guest on April-19-2021

Browse Popular Code Answers by Language