Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute:

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
share|improve this question

1 Answer 1

No. You can just return there and the job won't be retried (since it'll be considered successful).

share|improve this answer
    
that solves issue of retrying job but I I don't like idea of putting it to successful queue (I want to have a grasp of how many jobs have failed and avoid false positives in successful queue) – Filip Bartuzi yesterday

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.