tinyflow-framework 0.1.0

Streaming runtime engine — checkpoint, chained task execution, and state store
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Open the job-level SQLite database under a work directory.

use std::path::Path;
use std::sync::Arc;

use crate::state::SqliteJobStateStore;
use tinyflow_api::error::StreamResult;
use tinyflow_api::state::StateStore;

pub async fn open_job_state_db(work_dir: &Path) -> StreamResult<Arc<dyn StateStore>> {
    let path = work_dir.join("job/state.db");
    SqliteJobStateStore::open(&path).await
}