Search code examples
ruby-on-railssidekiq

Sidekiq + Rails: How to see queue of "Busy" jobs?


I have a script that looks for jobs:

Sidekiq::Queue.new(queue_name).any? { |q| q.args[0] == blah_id } ||
Sidekiq::RetrySet.new.any? { |r| r.queue == queue_name && r.args[0] == blah_id } ||
Sidekiq::ScheduledSet.new.any? { |s| s.queue == queue_name && s.args[0] == blah_id }

However, this doesn't look inside of Busy: enter image description here

How would I look inside of Busy?


Solution

  • That's the Sidekiq::Workers API:

    https://github.com/mperham/sidekiq/blob/90190e0dc40744cb07a12291e5ecc20b069981b6/lib/sidekiq/api.rb#L931