stormchaser-engine 1.4.2

A robust, distributed workflow engine for event-driven and human-triggered workflows.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use anyhow::Result;

pub async fn persist_storage_hashes(
    tx: &mut sqlx::PgConnection,
    run_id: uuid::Uuid,
    storage_hashes: Option<&serde_json::Map<String, serde_json::Value>>,
) -> Result<()> {
    let Some(hashes) = storage_hashes else {
        return Ok(());
    };
    for (name, hash_val) in hashes {
        if let Some(hash) = hash_val.as_str() {
            crate::db::upsert_run_storage_state(&mut *tx, run_id, name, hash).await?;
        }
    }
    Ok(())
}