Docs menuFeatures

DOCS / FEATURES

Background jobs & scheduled tasks

Queued work and recurring tasks run from Postgres, inside the API process. There is no Redis and no separate worker process: the workers are Tokio tasks spawned by main.rs. The code is in api/src/jobs/, where mod.rs holds the queue and worker, schedule.rs the recurring tasks, and maintenance.rs the purges.

Queued jobs

The catalog

jobs::Job is the single list of background work. Payloads are typed, so an enqueue site can't forget a field. Serde owns the stored form: each variant's #[serde(rename)] is its kind, and its fields are the JSON payload. A unit test pins every kind string, because rows already queued in a deployment depend on them:

[ full guide ]

The rest of this guide comes with the repo.

  • Scheduled tasks
  • Operating notes
Get LaunchCrate