Skip to content

Instantly share code, notes, and snippets.

@doyle
Created December 10, 2018 20:32
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 doyle/518915f12b5ad0556fade85929d566cc to your computer and use it in GitHub Desktop.
Save doyle/518915f12b5ad0556fade85929d566cc to your computer and use it in GitHub Desktop.
Finding sidekiq jobs
# Find jobs by class
Sidekiq::Queue.new('queue').select{|j| j.display_class == 'Foo'}
# Find jobs by argument (foo is the name of the argument and bar is the value in this case)
Sidekiq::Queue.new('queue').select{|j| j['args'][0]['foo'] == 'bar'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment