class Mosquito::Api::Queue
- Mosquito::Api::Queue
- Reference
- Object
Overview
Represents a named queue in the system, and allows querying the state of the queue. For more about the internals of a Queue in Mosquito, see Mosquito::Queue
.
Defined in:
mosquito/api/queue.crConstructors
-
.new(name : String)
Creates an instance of a named queue.
Class Method Summary
-
.all : Array(Queue)
Returns a list of all known named queues in the system.
Instance Method Summary
- #<=>(other)
-
#dead_job_runs : Array(JobRun)
Gets a list of all the job runs in the internal dead queue.
-
#name : String
The name of the queue.
-
#pending_job_runs : Array(JobRun)
Gets a list of all the job runs in the internal pending queue.
-
#scheduled_job_runs : Array(JobRun)
Gets a list of all the job runs in the internal scheduled queue.
-
#size : Int64
The operating size of the queue, not including dead jobs.
-
#size_details : Hash(String, Int64)
The size of the queue, broken out by job state.
-
#waiting_job_runs : Array(JobRun)
Gets a list of all the job runs in the internal waiting queue.
Constructor Detail
Class Method Detail
Instance Method Detail
Gets a list of all the job runs in the internal pending queue.
Gets a list of all the job runs in the internal scheduled queue.
The size of the queue, broken out by job state.
Example:
Mosquito::Api::Queue.all.first.size_details
# => {"waiting" => 0, "scheduled" => 0, "pending" => 0, "dead" => 0}
The semantics of the keys are described in detail on the Mosquito::Queue
class, but in brief:
scheduled
is a list of jobs which are scheduled to be executed at a later time.waiting
is a list of jobs which should be executed ASAPpending
is a list of jobs for which execution has starteddead
is a list of jobs which have failed to execute