Przejdź do treści
Biblioteka skilli
DevOps i chmura · Integracja z narzędziem

render-background-workers

/render-background-workers

Konfiguruje na Render workery działające w tle do przetwarzania kolejek zadań, np. Celery, Sidekiq, BullMQ, Asynq i Oban, z łagodnym zamykaniem przez SIGTERM i podłączeniem Key Value.

Licencja
MIT
Ostatnia zmiana repozytorium
25.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
4
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Konfiguruje na Render workery działające w tle do przetwarzania kolejek zadań, np. Celery, Sidekiq, BullMQ, Asynq i Oban, z łagodnym zamykaniem przez SIGTERM i podłączeniem Key Value.

Oryginalny opis (EN)

在 Render 上搭建并配置后台 worker,用于基于队列的任务处理。当用户需要处理异步任务、从队列消费、运行 Celery/Sidekiq/BullMQ/Asynq/Oban worker、用 SIGTERM 实现优雅关闭、将 worker 接入 Key Value(Redis),或在 worker 与 cron 任务之间做选择时使用。触发词:background worker、async jobs、queue consumer、Celery、Sidekiq、BullMQ、Asynq、Oban、job processing、SIGTERM、graceful shutdown。

Jak działa

  1. When to Use
  2. How Workers Work
  3. Queue Framework Overview
  4. Pairing with Key Value
  5. Worker vs Cron vs Workflow
  6. Graceful Shutdown
  7. Blueprint Configuration
  8. References
  9. Related Skills
Sekcje z nagłówków SKILL.md, w oryginale · 99 linii, 648 słów
Podgląd SKILL.md
---
name: render-background-workers
description: "在 Render 上搭建并配置后台 worker,用于基于队列的任务处理。当用户需要处理异步任务、从队列消费、运行 Celery/Sidekiq/BullMQ/Asynq/Oban worker、用 SIGTERM 实现优雅关闭、将 worker 接入 Key Value(Redis),或在 worker 与 cron 任务之间做选择时使用。触发词: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`.

## 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 | 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

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

## Graceful Shutdown

- Before stopping an instance, Render sends **`SIGTERM`**, then waits up to **`maxShutdownDelaySeconds`** (**1–300**, **default 30**) before **`SIGKILL`**.
- Workers should: **(1)** stop accepting new jobs, **(2)** finish the current job or **checkpoint** progress, **(3)** close connections, **(4)** exit **0**.
- Set **`maxShutdownDelaySeconds`** to at least your **longest safe job duration** (see Dashboard or Blueprint).

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
    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

- **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
Pliki w paczce (4)
  • SKILL.md 5 KB
  • agents/openai.yaml 1 KB
  • references/graceful-shutdown.md 4 KB
  • references/queue-framework-setup.md 5 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · kael-odin/codex-plugins-zh100MIT
render-oss/skills100MIT

Migawka bazy z 13.11.2026 · wersja paczki d49f0509801d (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100daemons
    Doradza w używaniu Vercel Daemons, czyli długo działających procesów w tle z Dockerfile deklarowanych w vercel.json: konsumenci kolejek, workery Celery, Sidekiq i BullMQ, konfiguracja instancji i SIGTERM.
  • 100job-queue
    Buduje kolejki zadań i workery w tle w BullMQ, Celery lub Sidekiq: priorytety, współbieżność, zadania cykliczne, śledzenie postępu i łagodne zamykanie dla wolnych operacji.
  • 100daemons
    Opisuje Vercel Daemons, długo działające procesy w tle budowane z Dockerfile i deklarowane w vercel.json: konsumenci kolejek, workery, instancje na region i obsługa SIGTERM.
  • 100job-queues
    Obsługuje systemy kolejek zadań w tle: BullMQ, Celery, Sidekiq i Spring Batch, z harmonogramowaniem, ponowieniami, priorytetami, kontrolą współbieżności i dead letter queues.
  • 100background-job-orchestrator
    Obsługuje przetwarzanie zadań w tle w Bull i BullMQ (Redis), Celery i kolejkach chmurowych: ponowienia, harmonogramy, kolejki priorytetowe i zarządzanie workerami.
  • 90role-backend:background-jobs
    Projektuje przetwarzanie zadań w tle: kolejki Bull, Celery i Sidekiq, ponawianie z wykładniczym odstępem, martwe litery i harmonogramy.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.