boson-backend-sqlite 0.1.1

SQLite QueueBackend adapter for Boson
Documentation

boson-backend-sqlite

Embedded SQLite QueueBackend for Boson jobs and runs.

Role

Thin wrapper around boson-backend-sql-common SqlQueueBackend.

Compose

use std::sync::Arc;

use boson::{Boson, SqliteQueueBackend};

let backend = Arc::new(SqliteQueueBackend::new("boson.db").await?);
let boson = Boson::builder()
    .queue_backend(backend)
    .execution_context_factory(your_factory)
    .build()?;

Bootstrap

use boson_backend_sqlite::install_default_sqlite_backend;
use boson_core::default_backend_from_global;

let _backend = install_default_sqlite_backend("boson.db").await?;
let resolved = default_backend_from_global()?;

Enable via boson

Available via the boson crate feature sqlite.

Related crates