pub struct RunFailedEvent {
pub run_id: Uuid,
pub workflow_name: String,
pub error: Option<String>,
pub cost_usd: Decimal,
pub duration_ms: u64,
pub labels: HashMap<String, String>,
pub at: DateTime<Utc>,
}Expand description
Payload of the Event::RunFailed event.
§Examples
use std::collections::HashMap;
use chrono::Utc;
use ironflow_engine::notify::RunFailedEvent;
use rust_decimal::Decimal;
use uuid::Uuid;
let payload = RunFailedEvent {
run_id: Uuid::now_v7(),
workflow_name: "deploy".to_string(),
error: Some("step crashed".to_string()),
cost_usd: Decimal::ZERO,
duration_ms: 3000,
labels: HashMap::new(),
at: Utc::now(),
};
assert_eq!(payload.error.as_deref(), Some("step crashed"));Fields§
§run_id: UuidRun identifier.
workflow_name: StringWorkflow name.
error: Option<String>Error message.
cost_usd: DecimalAggregated cost in USD at the time of failure.
duration_ms: u64Aggregated duration in milliseconds at the time of failure.
labels: HashMap<String, String>Labels of the run at the time of the failure.
at: DateTime<Utc>When the failure occurred.
Trait Implementations§
Source§impl Clone for RunFailedEvent
impl Clone for RunFailedEvent
Source§impl Debug for RunFailedEvent
impl Debug for RunFailedEvent
Source§impl<'de> Deserialize<'de> for RunFailedEvent
impl<'de> Deserialize<'de> for RunFailedEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RunFailedEvent
impl RefUnwindSafe for RunFailedEvent
impl Send for RunFailedEvent
impl Sync for RunFailedEvent
impl Unpin for RunFailedEvent
impl UnsafeUnpin for RunFailedEvent
impl UnwindSafe for RunFailedEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more