@lucid-softworks/queue-client
v0.1.0
Published
Enqueue, schedule, inspect, deduplicate, and cancel durable jobs.
Downloads
182
Maintainers
Readme
@lucid-softworks/queue-client
Enqueue, schedule, inspect, deduplicate, and cancel durable jobs through any
QueueStore.
import { QueueClient } from "@lucid-softworks/queue-client";
const job = await client.enqueue(
"send-email",
{ to: "[email protected]" },
{
maxAttempts: 5,
deduplicationKey: "welcome:42",
},
);delay and availableAt create scheduled jobs. An active deduplication key
returns the existing job. IDs must be unique, priorities finite, and attempt
limits positive integers. Cancelling a terminal job is a no-op.
