Render background workers

From fanfan-de/anybox · View interactive version

Render background workers is an AI agent skill from the GitHub repository fanfan-de/anybox. 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 (Redis), or choose between workers

How to use this skill

Skill file

Render Background Workers

This skill explains worker services on Render: processes that consume jobs from a queue instead of serving HTTP. Pair with render-blueprints, render-env-vars, and render-networking when wiring render.yaml and private connectivity.

When to Use

Per-framework setup and signal-handling detail: references/queue-framework-setup.md, references/graceful-shutdown.md.

How Workers Work

Queue Framework Overview

| Framework | Language | Queue backend | Notes |

|-----------|----------|---------------|--------|

| Celery | Python | Redis / Key Value | Most common Python task queue |

| Sidekiq | Ruby | Redis / Key Value | Standard for Rails |

| BullMQ | Node.js | Redis / Key Value | Modern Node queue (Redis-based) |

| Asynq | Go | Redis / Key Value | Go async task processing |

| Oban | Elixir | Postgres (not Redis) | Queue stored in the database |

Pairing with Key Value

See references/queue-framework-setup.md for minimal app + YAML examples.

Worker vs Cron vs Workflow

| 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; no idle instance cost between runs |

Graceful Shutdown

Language- and framework-specific handlers: references/graceful-shutdown.md.

Blueprint Configuration

Minimal pattern: type: worker, runtime, buildCommand, startCommand, and envVars wired from Key Value.

services:
  - type: keyvalue
    name: jobs
    plan: starter
    region: oregon
    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: connectionString

Optional: maxShutdownDelaySeconds on the worker service for longer draining jobs.

References

| Topic | File |

|--------|------|

| Celery, Sidekiq, BullMQ, Asynq, Oban setup + YAML | references/queue-framework-setup.md |

| SIGTERM, maxShutdownDelaySeconds, per-language patterns | references/graceful-shutdown.md |

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.