Skip to main content

Module worker

Module worker 

Source

Structs§

IdlePollGate
Process-local admission for idle job claims. Clone one instance into every worker that should share the same periodic claim limit. The permits do not limit running jobs or heartbeats.
JobFromDB
JobWorkerConfig
Settings for the sole job worker. The reclaim window must be at least three heartbeat intervals; a larger window allows more transient DB failures.

Constants§

DEFAULT_HEARTBEAT_INTERVAL
Default heartbeat interval for an active job.
DEFAULT_MAX_RETRIES
Default maximum number of retry attempts before a job is moved to the dead letter queue.
DEFAULT_RECLAIM_WINDOW
Default reclaim window after the last successful heartbeat.

Functions§

job_worker
Start a job worker that processes jobs from the queue.