Skip to content

Instantly share code, notes, and snippets.

@apeckham
Last active September 11, 2023 15:16
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save apeckham/005436cb361bf1b17855 to your computer and use it in GitHub Desktop.
sidekiq: delete all jobs of a certain class/worker
Sidekiq::Stats.new.queues.each { |queue_name, _| Sidekiq::Queue.new(queue_name).each { |j| j.delete if j.klass == 'MyWorker' } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment