Goal
Design Python workers with clear job handling, retries, and operational behavior.
When to Use
- Background work runs in Python.
- Queue consumers or schedulers need structure.
- Worker logic and package layout are unclear.
Instructions
- Define job sources, payloads, and success conditions.
- Plan worker lifecycle, concurrency, retries, and idempotency.
- Separate worker entrypoint, handlers, and shared domain logic.
- Note environment, config, and observability requirements.
Constraints
- Do not mix too many job types into one handler path.
- Keep job contracts explicit.
- Avoid hidden side effects without visibility.
Output Format
- worker design
- handler structure
- retry and observability notes
- packaging guidance
Examples
- "Design a Python worker for ingest pipelines."
- "How should this scheduled Python processor be organized?"