Skip to main content

Crate background_jobs_sled

Crate background_jobs_sled 

Source
Expand description

§Background Jobs Sled Storage

An implementation of the Background Jobs Storage trait based on the Sled embedded database

§Usage

use background_jobs::{tokio::WorkerConfig, sled::Storage};

let db = sled::Config::new().temporary(true).open()?;
let storage = Storage::new(db)?;
let job_queue = WorkerConfig::new(storage, |_| MyState::new("My App"))
    .register::<MyJob>()
    .set_worker_count("default", 8)
    .start();

Structs§

Storage
The Sled-backed storage implementation

Enums§

Error
The error produced by sled storage calls

Type Aliases§

Result
A simple alias for Result<T, Error>