Skip to main content
Module

x/kvmq/mod.ts>Worker#processJobs

Library inspired by BullMQ for Deno
Latest
method Worker.prototype.processJobs
import { Worker } from "https://deno.land/x/kvmq@v0.3.0/mod.ts";

Starts processing jobs.

If you already called this method and it's still running, the current call will first wait for previous one to finish.

Pass an abort signal to stop processing jobs at a later time. Aborting won't wait for the already started jobs to finish processing. To also wait for all currently running jobs, use await Promise.all(worker.activeJobs).

Returns a promise that resolves when the job popping loop exits. The only ways to exit this loop is to use the signal argument or stopProcessing. It can reject when getting or updating jobs in the database fails. Whenever an error occurs in the processing handler, the worker will emit an error event.

Parameters

optional
options: { signal?: AbortSignal; } = [UNSUPPORTED]

Returns

Promise<void>