JobQueue.push() method

Enqueues one job, optionally delayed or time-limited, refusing to enqueue without a handler.

Signature:

push(job: T, options?: PushOptions): JobQueue<T>;

Parameters

Parameter

Type

Description

job

T

the job body, of whatever type this queue carries

options

PushOptions

(Optional) when the job may run, and how long it stays retriable

Returns:

JobQueue<T>

this queue, for chaining

Exceptions

TypeError if no handler has been registered with JobQueue.onPop()

Remarks

The handler check is the only difference from JobQueuePublisher.push(), whose caveats all apply here too — most importantly that a successful call means the job was handed off, not that the broker accepted it. A broker failure is logged, not thrown.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.