pub struct ScheduleOccurrencesMissedEvent {
pub schedule_id: Uuid,
pub workflow_name: String,
pub reason: ScheduleMissReason,
pub count: u64,
pub first: DateTime<Utc>,
pub last: DateTime<Utc>,
pub at: DateTime<Utc>,
}Expand description
Payload of the Event::ScheduleOccurrencesMissed event.
A cron schedule skipped some of its occurrences: the server was down
longer than the catch-up window allows, the catch-up policy dropped them,
or the previous run was still active under an overlap skip policy.
§Examples
use chrono::{TimeDelta, Utc};
use ironflow_engine::notify::ScheduleOccurrencesMissedEvent;
use ironflow_store::models::ScheduleMissReason;
use uuid::Uuid;
let now = Utc::now();
let payload = ScheduleOccurrencesMissedEvent {
schedule_id: Uuid::now_v7(),
workflow_name: "nightly-report".to_string(),
reason: ScheduleMissReason::OutsideWindow,
count: 3,
first: now - TimeDelta::hours(3),
last: now - TimeDelta::hours(1),
at: now,
};
assert_eq!(payload.count, 3);Fields§
§schedule_id: UuidSchedule that missed the occurrences.
workflow_name: StringWorkflow the schedule starts.
reason: ScheduleMissReasonWhy the occurrences were not run.
count: u64Number of missed occurrences.
first: DateTime<Utc>Earliest missed occurrence.
last: DateTime<Utc>Latest missed occurrence.
at: DateTime<Utc>When the ticker noticed the miss.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ScheduleOccurrencesMissedEvent
impl<'de> Deserialize<'de> for ScheduleOccurrencesMissedEvent
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 ScheduleOccurrencesMissedEvent
impl RefUnwindSafe for ScheduleOccurrencesMissedEvent
impl Send for ScheduleOccurrencesMissedEvent
impl Sync for ScheduleOccurrencesMissedEvent
impl Unpin for ScheduleOccurrencesMissedEvent
impl UnsafeUnpin for ScheduleOccurrencesMissedEvent
impl UnwindSafe for ScheduleOccurrencesMissedEvent
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