Skip to content

py-worker features

Generated from templates/py-worker/template.json. Features that remove Python packages list their requirements.txt entries under “Packages”.

FeatureDefaultWhat it adds
queue
BullMQ consumers
Always

Workers pulling from the same Redis queues your Node API produces to, with graceful SIGINT/SIGTERM shutdown.

logging
Structured logging
Always
database
SQLAlchemy over Postgres
On

Direct database access to the same schema your API owns. Models are hand-written here rather than generated, so they must be kept in step with the Prisma schema by hand.

Packages: SQLAlchemy, psycopg2-binary, greenlet

Files it owns (2)
  • utils/db.py
  • models/**
docker
Docker image
On
Files it owns (2)
  • Dockerfile
  • .dockerignore
ci
Forgejo Actions CI
On
Files it owns (1)
  • .forgejo/**
telemetry
OpenTelemetry → OpenObserve
On

Traces, logs and metrics over OTLP (set OPENOBSERVE_URL/ORG/TOKEN, or any OTEL_* backend), with a span per job and Redis instrumentation. Off at runtime until connected.

Packages: googleapis-common-protos, opentelemetry-api, opentelemetry-exporter-http-transport, opentelemetry-exporter-otlp-common, opentelemetry-exporter-otlp-proto-common, opentelemetry-exporter-otlp-proto-http, opentelemetry-instrumentation, opentelemetry-instrumentation-redis, opentelemetry-proto, opentelemetry-sdk, opentelemetry-semantic-conventions, protobuf, wrapt

Files it owns (1)
  • utils/telemetry.py
temporal
Temporal worker
Opt-in

Runs durable workflows and activities from temporal/ (an example of each included) on its own TEMPORAL_TASK_QUEUE, next to the BullMQ consumers, with a span per workflow and activity when telemetry is on. Pair with the API's temporal feature, which starts them.

Packages: nexus-rpc, temporalio, types-protobuf

Files it owns (2)
  • utils/temporal.py
  • temporal/**
  • temporal works on the default Python image; its wheels include musl and glibc builds.
  • telemetry off removes every OpenTelemetry package; the job wrapper and setup_telemetry() calls go with it.