Jobs & queues
Background work is modeled as jobs (and sometimes events). Simple apps may drain work in-process; durable setups run a worker next to HTTP.
Mental model
HTTP handler → enqueue job → worker processes job
When to use a job
| Use a job | Keep in the request |
|---|---|
| Email, webhooks, slow I/O | Tiny pure compute |
| Must survive process restart | Must finish before response |
Running a worker
Check your CLI version:
atlantus --help
# often: atlantus job work --path .
Deploy HTTP (atlantus start) and the worker as two processes sharing the
same app directory and ATL_DATABASE_URL when the queue is durable.
App code
Enqueue from a handler or service using the job built-ins available in your
binary (atlantus check will accept valid names). Keep job handlers under
app/jobs/ as scaffolded.
Next: CLI.