class Sidekiq::Queue
- Sidekiq::Queue
- Reference
- Object
Overview
Encapsulates a queue within Sidekiq. Allows enumeration of all jobs within the queue and deletion of jobs.
queue = Sidekiq::Queue.new("mailer") queue.each do |job| job.klass # => "MyWorker" job.args # => [1, 2, 3] job.delete if job.jid == "abcdef1234567890" end
Included Modules
- Enumerable(Sidekiq::JobProxy)
Defined in:
sidekiq/api.crConstructors
Class Method Summary
Instance Method Summary
- #clear
-
#each(&)
Must yield this collection's elements to the block.
- #find_job(jid)
- #latency
- #name : String
-
#paused?
Sidekiq Pro overrides this
-
#size
Returns the number of elements in the collection.
Constructor Detail
Class Method Detail
Instance Method Detail
Must yield this collection's elements to the block.
Find the job with the given JID within this queue.
This is a slow, inefficient operation. Do not use under normal conditions. Sidekiq Pro contains a faster version.
Calculates this queue's latency, the difference in seconds since the oldest job in the queue was enqueued.
@return Float64
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4