Sidekiq queue growing


(Jose C Gomez) #1

I’ve got more than 6K items in my sidekiq queue and growing


It appears to be related to the transaltion plugin in

I’ve removed the plugin and rebuilt but the queue still has the jobs. Any way to clear the queue of these DetectTranslation jobs?


(Jose C Gomez) #2

I was able to do this via the rails console

./launcher enter app
rails c
queue = Sidekiq::Queue.new("default")
queue.each do | job |
    job.delete if job.klass == 'Jobs::DetectTranslation'
end

(Jose C Gomez) #3

Additionally is there any way to increase the threads in sidekiq?


(Bart) #4

I have an issue with my queue too - apparently we rebaked some posts at a too high rate. Can someone help me tweak the script above to:

  • Work on Jobs:ProcessPost
  • Delete all jobs where post_id is below a certain value

Edit: I think I’ve worked it out, how’s this?

queue = Sidekiq::Queue.new("default")
queue.each do | job |
	job.delete if (job.klass == 'Jobs::ProcessPost' && job.args[0]["post_id"] <= 123456 )
end