Expand description
Background task worker + optional scheduler + HTTP dispatch for Sova.
Modules§
- priority
- Common priority levels (higher is claimed first).
Structs§
- Console
Guard - RAII guard: enables
is_interactiveuntil dropped. - Dispatch
- One-shot (or delayed) enqueue request.
- Http
Task Error - HTTP-facing wrapper around
TaskErrorthat maps intoError::Response. - Job
- Named handler with optional recurring schedule, queue, and priority.
- JobInfo
- One registered job (for CLI
tasks list/tasks schedule). - Task
Backend - App state handle for dispatch from request handlers.
- Task
Dispatched - Fired after a task is successfully enqueued.
- Task
Failed - Fired when a worker marks a task as terminal failure (no more retries).
- Task
Registry - App-state registry for CLI and introspection.
- Tasks
- Registers jobs and runs a worker (and optional scheduler) as [
BackgroundService]s.
Enums§
Functions§
- ask
- Prompt for a line of input. Errors when not interactive.
- bearer_
guard - Require
Authorization: Bearer <token>for task HTTP routes. - confirm
- Yes/no prompt. When not interactive, returns
default. - enter_
cli - Enable interactive console for the current thread (CLI
tasks run). - error
- Print an error when interactive.
- every_
slot - Slot id for an every-schedule at
now(exported for tests). - info
- Print an info line when interactive; otherwise no-op.
- is_
interactive - True while inside
enter_cli. - line
- Print a blank or custom line when interactive.
- parse_
cron - Pad 5-field crontab to 6-field (seconds = 0) for the
croncrate. - table
- Print a simple ASCII table when interactive.
- warn
- Print a warning when interactive.