BaseJobQueue.drainRequeue() method
Drain step three: put back whatever the budget ran out on.
Signature:
drainRequeue(): Promise<void>;
Returns:
Promise<void>
Remarks
Only jobs, and only with JobQueueOptions.drainRequeue on. Under safe delivery each abandoned job is still checked out — its handler has not settled, so its worker key is held — and the lease returns it to the queue once this process is gone. This step therefore adds a copy rather than rescuing one; it is the sole recovery only when safe delivery is off.
The abandoned handler is still running as this pushes its job back, so the job may finish here and also be delivered again — twice, counting the lease recovery.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.