Is it possible to move sidekiq job straight to dead queue from SidekiqWorker instance level (i.e. while executing)
class MyWorker
  include Sidekiq::Worker
  sidekiq_options retry: 9
  def perform(name)
    if name == 'StackOverflow'
      # ----> skip_retry_queue_and_go_to_dead_queue
    else 
      # do_stuff!
    end
  end
end
Not dynamically within an executing job.
Statically, if you set sidekiq_options retry: 0, the job will go straight to the Dead set if it raises an error.
https://github.com/mperham/sidekiq/wiki/Error-Handling#configuration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With