Expand description
coil
is a efficient background job queue for Postgres. The API is very
similiar and indeed based upon swirl.
In addition to the functionality swirl
offers, however, coil
can:
- Queue asynchronous tasks for execution on an executor, whether it be
smol
,tokio
orasync-std
- Queue functions with generics
- SQL queries in
coil
are ran asynchronously wherever possible - Migrations are stored in the binary, and accessible via a
migrate()
fn. No more needing to copy-paste migration files!
Macros§
- register_
job - Register a job to be run by coil. This must be called for any
implementors of [
coil::Job
]
Structs§
- Builder
- Builder pattern struct for the Runner
- Runner
- Runner for background tasks. Synchronous tasks are run in a threadpool.
Enums§
Traits§
Functions§
- migrate
- Run the migrations for the background tasks. This creates a table _background_tasks which stores the tasks for execution
Type Aliases§
- Perform
Error - Catch-all error for jobs
Attribute Macros§
- background_
job - The attribute macro for creating background jobs.