mc9
mc9

Reputation: 6341

Kill multiple Sidekiq jobs from the same worker

I would like to know how to kill many Sidekiq jobs from the same worker at once.

I deployed a bug on a production environment and there are queued jobs that are bugging out. I can simply fix the bug and deploy again, but the jobs are time-sensitive (they send out SMS alert to people).

When the bug is gone, the jobs will be executed and many people will get outdated SMS alerts. So I would like to kill all the jobs from that worker before deploying my fix.

Any suggestions? The buggy jobs are enqueued with many other jobs and I can't just remove all jobs from one queue.

Upvotes: 0

Views: 211

Answers (1)

Mike Perham
Mike Perham

Reputation: 22228

Ideally you should enqueue those messages to a different queue so you can clear that queue on its own. There's no other efficient way to remove a set of jobs.

Upvotes: 1

Related Questions