Background Work
When a request uploads a file, return the response before a worker creates the thumbnail. Use a queued job for that unit of work, an event to notify other features that the file arrived, or a schedule for periodic cleanup.
Run a Photo Job picks up from the SQLite lesson. Send an existing photo ID to a local worker and observe how a retry works.
Choose How Work Runs
- Jobs and Queues cover what you send to a worker and how you dispatch it.
- Events versus Queues helps you choose the right mechanism. See Events and Event Subscribers when other features need to react to something that happened.
- Task Scheduling shows how to run work on an interval or at a set time.
Run and Test Background Work
- Workers explains local execution and when a separate process needs a shared backend.
- Retries and Idempotency explains how to make a handler safe to run again.
- Job and Queue Tests shows how to verify dispatch and handler behavior.
Related Sections
- Queue Workers and Scheduler Processes cover production deployment.
- Libraries includes standalone Queue, Events, and Scheduler documentation.