render-background-workers — скилл для Claude Code: воркеры на Render
Скилл помогает настроить фоновые воркеры на Render: подключить очередь, поймать SIGTERM и не потерять задачи при деплое.
npx skills add render-oss/skills --skill render-background-workers -a claude-codeЧто делает render-background-workers
Скилл разбирает сервисы-воркеры на Render: процессы, которые читают задачи из очереди вместо того, чтобы отвечать на HTTP. Публичного URL у воркера нет, входящий приватный трафик к нему не идёт. Зато исходящие соединения он открывает сам — к PostgreSQL, Key Value, приватным и веб-сервисам по внутренним адресам.
Внутри — таблица фреймворков с их бэкендами: Celery и Sidekiq работают через Key Value, BullMQ и Asynq тоже, а Oban хранит очередь прямо в Postgres. Отдельно про выбор между воркером, Cron Job и Workflow. Есть пример render.yaml с type: worker и связкой REDIS_URL через fromService.
Если Render Key Value выступает брокером задач, ставьте maxmemoryPolicy: noeviction. Политики вроде allkeys-lru рассчитаны на кэш и выкидывают ключи очереди вместе с задачами. В Blueprint для Key Value нужен ipAllowList — часто пустой список, если доступ только по приватной сети. Для корректного завершения скилл отправляет к references/deployments.md и references/graceful-shutdown.md, а для сетевых вопросов — к references/private-networking.md.
Какие задачи решает
- поднять воркер, который читает задачи из очереди
- выбрать между воркером, Cron Job и Workflow
- настроить Key Value как брокер, а не как кэш
- пережить деплой без потери задач в работе
- связать воркер с очередью через
render.yaml
Примеры запросов агенту
- Настрой фоновый воркер на Render для Celery, очередь — Render Key Value
- Почему мой воркер теряет задачи при деплое? Разбери graceful shutdown с SIGTERM
- Что выбрать для периодической задачи: воркер или Cron Job?
Как установить render-background-workers
1Через Skills CLI (Vercel)
npx skills add render-oss/skills --skill render-background-workers -a claude-code2Вручную: положить файлы
~/.claude/skills/render-background-workers/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/render-background-workers/
1Через Skills CLI (Vercel)
npx skills add render-oss/skills --skill render-background-workers -a codex2Вручную: положить файлы
.agents/skills/render-background-workers/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add render-oss/skills --skill render-background-workers -a cursor2Вручную: положить файлы
.cursor/skills/render-background-workers/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install render-oss/skills render-background-workers2Вручную: положить файлы
.github/skills/render-background-workers/SKILL.md1Через Skills CLI (Vercel)
npx skills add render-oss/skills --skill render-background-workers -a gemini-cli2Командой платформы
gemini skills install https://github.com/render-oss/skills --path skills/render-background-workersВручную: положить файлы
.devin/skills/render-background-workers/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add render-oss/skills --skill render-background-workers -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Из того же набора14
Похожие
Рядом в теме «DevOps и инфраструктура»
Всё по теме «DevOps и инфраструктура» →Вопросы о render-background-workers
Как установить render-background-workers в Claude?
Выполните npx skills add render-oss/skills --skill render-background-workers -a claude-code. Скилл появится в ~/.claude/skills/render-background-workers/SKILL.md.
Что делает render-background-workers?
Помогает настроить воркеры на Render для обработки задач из очереди: подключение брокера, выбор типа сервиса, корректное завершение по SIGTERM.
Какие фреймворки очередей поддерживаются?
Celery, Sidekiq, BullMQ, Asynq и Oban. Первые четыре работают через Key Value, Oban хранит очередь в Postgres.
Исходный текст
SKILL.md · MIT
---
name: render-background-workers
description: >-
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.
license: MIT
compatibility: Render background worker services
metadata:
author: Render
version: "1.0.0"
category: compute
---
# 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
- Designing or debugging **queue-backed workers** (Celery, Sidekiq, BullMQ, Asynq, etc.)
- Choosing between a **worker**, **Cron Job**, or **Workflow** for background work
- Configuring **Render Key Value** as a **broker** (not a cache) with correct **eviction policy**
- Implementing **graceful shutdown** so in-flight jobs are not lost on deploy
Per-framework setup and signal-handling detail: `references/queue-framework-setup.md`, `references/graceful-shutdown.md`.
Before deploying, restarting, or changing shutdown behavior, read `references/deployments.md`.
Before configuring or troubleshooting a worker's outbound private-network connection, read `references/private-networking.md`.
When choosing between a worker, cron job, and Workflow, read `references/service-types.md`.
## How Workers Work
- **Long-running services** with **no inbound (HTTP) traffic**. Render does not expose a public URL or internal hostname for workers the way it does for web or private services—**workers cannot receive private network traffic directed at them**.
- The typical pattern is a **poll loop**: the process connects to a **queue backend** (often **Render Key Value**, Redis-compatible **Valkey 8**) and **pulls jobs**.
- Workers **can initiate outbound connections** on the private network—to **PostgreSQL**, **Key Value**, **private services**, **web services** (internal URLs), and the public internet—subject to your plan and firewall rules.
## Queue Framework Overview
| 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 |
## Pairing with Key Value
- Use **Render Key Value** as the **job broker** when your framework expects Redis.
- Set **maxmemory policy** to **`noeviction`**. **`allkeys-lru`** and similar policies are for **caches**; evicting queue keys **drops jobs**.
- Wire **`REDIS_URL`** (or your framework’s equivalent) via **`fromService`** with `type: keyvalue` and `property: connectionString` in the Blueprint.
- **Blueprints require `ipAllowList`** on Key Value—include the CIDRs that should reach the instance (often `[]` for private-network-only access; see **render-blueprints** / Key Value field reference).
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 without a continuously running worker instance |
## Graceful Shutdown
- Workers should: **(1)** stop accepting new jobs, **(2)** finish the current job or **checkpoint** progress, **(3)** close connections, **(4)** exit **0**.
- Follow `references/deployments.md` for Render's current drain, signal, and shutdown-delay behavior.
Language- and framework-specific handlers: `references/graceful-shutdown.md`.
## Blueprint Configuration
Minimal pattern: **`type: worker`**, **`runtime`**, **`buildCommand`**, **`startCommand`**, and **`envVars`** wired from Key Value.
```yaml
services:
- 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: 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` |
| Deploy lifecycle, shutdown, restart, and verification | `references/deployments.md` |
| Private-network scope, internal addresses, and troubleshooting | `references/private-networking.md` |
| Service-type selection and execution models | `references/service-types.md` |
## Related Skills
- **render-deploy** — First deploy, CLI, service creation
- **render-blueprints** — Full `render.yaml` schema, `fromService`, projects
- **render-networking** — Private URLs, what can call what
- **render-scaling** — Worker plans, instance counts, limits
<!-- shared:documentation-retrieval -->
## Current documentation retrieval
Whenever this skill directs you to consult current Render documentation:
1. Retrieve the linked Markdown document directly with an available URL-fetching tool or HTTP client, such as `curl`. Do not substitute web-search summaries for the document.
2. Confirm that retrieval succeeded and returned the expected document, then read its contents. Saving a file or printing its path is not sufficient.
3. If the request fails or your tool cannot read the Markdown response, open and read the linked HTML version instead.
4. If neither version can be retrieved, disclose that the current reference is unavailable and follow any topic-specific fallback in the skill. Use bundled guidance only for stable constraints, and do not guess at changeable platform details.
When a task requires multiple references, apply this workflow to each one and distinguish the documents you verified from those that remain unavailable.
<!-- /shared:documentation-retrieval -->
© Render · MIT · render-oss/skills