mirror of
https://github.com/block/buzz.git
synced 2026-10-28 21:11:48 +00:00
Integrate workflow delivery with domain datastore tracing
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
//! Atomic workflow output persistence and captured-revision reads.
|
||||
use crate::{event, insert_mentions_in_transaction, Db, Result};
|
||||
use buzz_core::{tenant::CommunityId, StoredEvent};
|
||||
use buzz_datastore_tracing::datastore_span;
|
||||
use uuid::Uuid;
|
||||
|
||||
impl Db {
|
||||
/// Atomically persist a visible event, its thread metadata/mentions, and all
|
||||
/// required notifications. No caller may publish any row until this commits.
|
||||
/// Cancellation or any insert failure rolls the entire bundle back.
|
||||
#[datastore_span(name = "insert_event_with_notifications", system = "postgresql")]
|
||||
pub async fn insert_event_with_notifications(
|
||||
&self,
|
||||
community_id: CommunityId,
|
||||
@@ -47,6 +49,7 @@ impl Db {
|
||||
}
|
||||
|
||||
/// Read a captured workflow definition without reviving explicitly deleted revisions.
|
||||
#[datastore_span(name = "get_workflow_revision", system = "postgresql")]
|
||||
pub async fn get_workflow_revision(
|
||||
&self,
|
||||
community_id: CommunityId,
|
||||
|
||||
Reference in New Issue
Block a user