litestar-queues
Installation
SKILL.md
litestar-queues
litestar-queues 0.5.0 is the first-party Litestar worker abstraction for task registration, durable queue state, worker lifecycle, schedules, uniqueness, bounded maintenance, and application-facing task events.
Keep persistence and placement separate:
- A queue backend stores task records, identities, maintenance coordination, and optional event history.
- An execution backend decides where a claimed task runs.
- Worker wakeups are delivery hints. Persisted queue records remain the source of truth.
Code Style Rules
- Use
QueuePluginto wire lifecycle, application state, DI, task discovery, schedules, workers, and CLI commands. - Put worker settings under
QueueConfig(worker=WorkerConfig(...)). - Inject
QueueServicewithNamedDependency[QueueService]; never use a module-level service from handlers. - Import public core types from
litestar_queues. Import optional backend configuration from its backend submodule. - Keep persistent-backend arguments and metadata JSON-serializable. Pass stable object IDs instead of large payloads.
- Use PEP 604 unions and async I/O. Prefer
msgspecfor event/client DTOs unless the project already uses Pydantic.