Sidekiq queue growing

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?

I was able to do this via the rails console

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

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

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 ="default")
queue.each do | job |
	job.delete if (job.klass == 'Jobs::ProcessPost' && job.args[0]["post_id"] <= 123456 )