Skip to content

Instantly share code, notes, and snippets.

@lujanfernaud
Created July 27, 2020 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lujanfernaud/9ab2b03429f3216ae36d16c16200e697 to your computer and use it in GitHub Desktop.
Save lujanfernaud/9ab2b03429f3216ae36d16c16200e697 to your computer and use it in GitHub Desktop.
Sidekiq: Clear a Specific Queue

Sidekiq: Clear a Specific Queue

Find the queue by name:

> queue = Sidekiq::Queue.all.detect { |queue| queue.name == 'compliance_requests' }
=> #<Sidekiq::Queue:0x00007fa5c4069778 @name="compliance_requests", @rname="queue:compliance_requests">

Clear the queue:

> queue.clear
=> [0, true]
> queue.clear
=> [0, false]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment