Skip to content

Instantly share code, notes, and snippets.

@elkelk
Last active December 10, 2015 18:58
Show Gist options
  • Save elkelk/4478069 to your computer and use it in GitHub Desktop.
Save elkelk/4478069 to your computer and use it in GitHub Desktop.
Retrieve an array of currently processing Sidekiq queue names (https://github.com/mperham/sidekiq/)
Sidekiq.redis {|conn| conn.smembers('workers').map{|w| msg = conn.get("worker:#{w}"); msg ? [w, Sidekiq.load_json(msg)] : nil; }.compact.map{|w| w[1]["queue"]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment