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,
- Queue asynchronous tasks for execution on an executor, whether it be
- Queue functions with generics
- SQL queries in
coilare ran asynchronously wherever possible
- Migrations are stored in the binary, and accessible via a
migrate()fn. No more needing to copy-paste migration files!
Register a job to be run by coil. This must be called for any
implementors of [
Builder pattern struct for the Runner
Runner for background tasks. Synchronous tasks are run in a threadpool. Asynchronous tasks are spawned on the executor.
Run the migrations for the background tasks. This creates a table _background_tasks which stores the tasks for execution
Catch-all error for jobs
The attribute macro for creating background jobs.