Loading...
Loading...
Sets up and configures background workers on Render for queue-based job processing. Use when the user needs to process async jobs, consume from a queue, run Celery/Sidekiq/BullMQ/Asynq/Oban workers, handle graceful shutdown with SIGTERM, wire a worker to Key Value, or choose between workers and cron jobs for background work. Trigger terms: background worker, async jobs, queue consumer, Celery, Sidekiq, BullMQ, Asynq, Oban, job processing, SIGTERM, graceful shutdown.
npx skill4agent add render-oss/skills render-background-workersrender.yamlreferences/queue-framework-setup.mdreferences/graceful-shutdown.md| Framework | Language | Queue backend | Notes |
|---|---|---|---|
| Celery | Python | Key Value | Most common Python task queue |
| Sidekiq | Ruby | Key Value | Standard for Rails |
| BullMQ | Node.js | Key Value | Modern Node queue |
| Asynq | Go | Key Value | Go async task processing |
| Oban | Elixir | Postgres (not a Key Value queue) | Queue stored in the database |
noevictionallkeys-lruREDIS_URLfromServicetype: keyvalueproperty: connectionStringipAllowList[]references/queue-framework-setup.md| Need | Use | Why |
|---|---|---|
| Always-on queue consumer | Background Worker | Polls continuously; long-lived process |
| Periodic scheduled task | Cron Job | Runs on a schedule, exits; 12h max per run |
| Distributed parallel compute | Workflow | Each run gets its own instance; fan-out patterns |
| High-volume or bursty jobs | Workflow | Scales per run without a continuously running worker instance |
SIGTERMmaxShutdownDelaySecondsSIGKILLmaxShutdownDelaySecondsreferences/graceful-shutdown.mdtype: workerruntimebuildCommandstartCommandenvVarsservices:
- type: keyvalue
name: jobs
plan: starter
region: oregon
maxmemoryPolicy: noeviction
ipAllowList: []
- type: worker
name: task-worker
runtime: python
region: oregon
plan: starter
buildCommand: pip install -r requirements.txt
startCommand: celery -A tasks worker --loglevel=info
envVars:
- key: REDIS_URL
fromService:
name: jobs
type: keyvalue
property: connectionStringmaxShutdownDelaySeconds| Topic | File |
|---|---|
| Celery, Sidekiq, BullMQ, Asynq, Oban setup + YAML | |
SIGTERM, | |
render.yamlfromService