forge-jobs 0.3.1

Sidekiq-style job queue with embedded SQLite and pluggable Postgres. Per-queue workers + cron + cluster-wide rate-limit budget + cancellation that survives across replicas.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thiserror::Error;

pub type Result<T> = std::result::Result<T, JobError>;

#[derive(Debug, Error)]
pub enum JobError {
    #[error("job already registered: {0}")]
    DuplicateId(String),
    #[error("invalid schedule interval: {0:?}")]
    InvalidInterval(std::time::Duration),
    #[error("store: {0}")]
    Store(String),
    #[error("job failed: {0}")]
    JobFailed(String),
}