Skip to main content

Crate yarn

Crate yarn 

Source
Expand description

A simple PostgreSQL-based task runner.

Structs§

Worker
A worker that checks for new tasks and runs them.

Enums§

SubmitError
Errors that may occur when submitting or scheduling tasks.

Constants§

NOTIFY_PG_CHANNEL
The name of the PostgreSQL notification channel used to signal that there are new tasks.

Traits§

Task
A ttype that can be saved and retrieved from the database (via Serialize and DeserializeOwned), and can run with its specified state. You should only implement this trait for one type, which you’ll use in the database. If you need multiple kinds of tasks, simply use an enum.
TaskError
An error that can say whether it should be considered permanent or transient.
TaskExt
Additional functionality for Task types. Used for submitting and scheduling tasks (i.e. inserting in the database) or fetching tasks from the database.