JobQueue.onPop() method
Registers the handler called for each job popped from this queue.
Signature:
onPop(handler: JobQueuePopHandler<T>): JobQueue<T>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
handler |
what to do with each job; its return value re-schedules |
Returns:
JobQueue<T>
this queue, for chaining
Remarks
Required before JobQueue.start() or JobQueue.push(), both of which throw without it. Replaces any handler already registered — the last call wins. See JobQueuePopHandler for what its return value does.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.