Skip to main content

Module jobs

Module jobs 

Source
Expand description

Background job queue with priority scheduling, retries, and dead-letter support.

Jobs are enqueued with a name, JSON payload, priority, and retry policy. Workers pull from the queue and invoke registered handlers. Failed jobs are retried with exponential back-off until max_retries is exhausted, at which point they move to the dead-letter queue for manual inspection.

Structs§

Job
A job in the queue.
JobQueue
The job queue engine.
QueueStats
Worker
A worker that continuously processes jobs from the queue.
WorkerHandle
Handle returned by Worker::start() to stop the background thread.

Enums§

JobResult
Result of processing a job.
JobStatus
Job status.
Priority
Job priority levels.

Type Aliases§

JobHandler
A handler function for a named job type.