Skip to main content

Crate awa

Crate awa 

Source
Expand description

Awa — Postgres-native background job queue for Rust and Python.

This is the facade crate that re-exports the main types from awa-model, awa-macros, and awa-worker for ergonomic usage.

Re-exports§

pub use awa_model as model;
pub use awa_worker as worker;

Modules§

admin
bridge
Transactional enqueue for non-sqlx Postgres stacks.
insert
migrations
storage

Structs§

CallbackConfig
Configuration for CEL callback expressions.
CallbackGuard
Proof that this job registered an external callback in the database.
Client
The Awa worker client — manages dispatchers, heartbeat, and maintenance.
ClientBuilder
Builder for the Awa worker client.
DlqMetadata
DlqRow
HealthCheck
Health check result.
InsertOpts
Options for inserting a job.
InsertParams
Parameters for bulk insert.
JobContext
Context passed to worker handlers during job execution.
JobKindDescriptor
JobRow
A row from the awa.jobs table.
ListDlqFilter
PeriodicJob
A periodic job schedule definition.
PeriodicJobBuilder
Builder for PeriodicJob.
ProgressState
Mutable progress buffer shared between handler and heartbeat service.
QueueConfig
Configuration for a single queue.
QueueDescriptor
Code-declared, operator-facing descriptor for a queue.
QueueHealth
Per-queue health.
RateLimit
Rate limit configuration for a queue.
RetentionPolicy
Per-queue or global retention policy for completed and failed/cancelled jobs.
RetryFromDlqOpts
StorageStatus
UniqueOpts
Uniqueness constraint options.

Enums§

AwaError
BuildError
Errors returned when building a worker client.
DefaultAction
What resolve_callback should do if no CEL conditions match or no expressions are configured.
JobError
Error type for job handlers — any error is retryable unless it’s terminal.
JobEvent
Typed lifecycle event for a specific job argument type.
JobResult
Result of executing a job handler.
JobState
Job states in the lifecycle state machine.
QueueCapacity
Capacity information for a queue, mode-dependent.
ResolveOutcome
Outcome of resolve_callback.
StorageCapability
UntypedJobEvent
Untyped lifecycle event keyed only by job kind.

Traits§

JobArgs
Trait for typed job arguments.
Worker
Worker trait — implement this for each job type.

Functions§

insert
Insert a job with default options.
insert_many
Insert multiple jobs in a single statement.
insert_many_copy
Insert many jobs using COPY for high throughput.
insert_many_copy_from_pool
Convenience wrapper that acquires a connection from the pool.
insert_with
Insert a job with custom options.

Type Aliases§

CallbackToken

Derive Macros§

JobArgs
Derive macro for job argument types.