JoobQ::Queue(T)
Inherits JoobQ::BaseQueue < Reference < Object
The Queue class now focuses solely on queue operations
Constants
Constructors
Instance methods
Strict variant of add: a payload that does not deserialize into this queue's job type raises
(JSON::ParseException, JSON::SerializableError) instead of being logged, and the job id comes back.
Store and connection errors raise as well. The job always lands on this queue: a queue in the payload is
overridden, because the store pushes onto job.queue, which would otherwise let a payload pick any Redis key.
add, add_batch and add_batch_strings still trust the queue in the payload, so do not feed them untrusted input.
Schedules a serialized job to move onto the queue at at, and returns its job id. Raises like add! when the
payload does not fit this queue's job type, and, like add!, ignores a queue in the payload. The delayed-job
scheduler moves it when it is due.
Resizes this process only; used when following a size set elsewhere.
Enhanced cleanup for successfully completed jobs IMPORTANT: job_json must be the FULL job JSON string, not just the job ID
Pipelined job cleanup for improved performance IMPORTANT: job_json must be the FULL job JSON string, not just the job ID
Batch job cleanup for improved performance
Override for explicitly injected execution dependencies; serialized jobs do not carry process-local store handles.
Changes the number of workers at runtime. The new size is stored so every process serving this queue follows it (see WorkerRegistry).
Starting a running queue does nothing. The first start recovers jobs stranded by a crashed process (and this process's own previous incarnation) back to the head of the queue, then publishes this process's liveness heartbeat before any worker claims, so another process's recovery can never reclaim a job this process holds.
A worker's claim source in dispatcher mode: wait up to the block timeout for the first claim, then drain up to
max total without blocking. Preserves FIFO (the dispatcher claims in order) and batch throughput under load.
Verify that a job has been properly removed from processing queue