rust-job-queue-api-worker-system 0.1.0

A production-shaped Rust job queue: Axum API + async workers + Postgres SKIP LOCKED dequeue, retries with decorrelated jitter, idempotency, cooperative cancellation, OpenAPI, Prometheus metrics.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Worker subsystem: claim jobs from the queue, execute them, transition
//! them to their terminal state, and recover after crashes.
//!
//! Submodules:
//! - [`executor`] — the `Executor` trait and the built-in deterministic
//!   `SimulatedExecutor`.
//! - [`runtime`] — `WorkerRuntime`, which spawns a pool of worker tasks
//!   and owns the graceful-shutdown sequence.
//! - [`recovery`] — the startup sweep that re-queues rows left in
//!   `running` by previously-crashed workers.

pub mod executor;
pub mod recovery;
pub mod runtime;

pub use executor::{ExecutionContext, ExecutionOutcome, Executor, SimulatedExecutor};
pub use recovery::recover_stale_at_startup;
pub use runtime::WorkerRuntime;