use sova_core::Event;
#[derive(Debug, Clone)]
pub struct TaskDispatched {
pub id: String,
pub name: String,
pub queue: String,
}
impl Event for TaskDispatched {
fn name(&self) -> &'static str {
"tasks.dispatched"
}
}
#[derive(Debug, Clone)]
pub struct TaskFailed {
pub id: String,
pub name: String,
pub attempts: u32,
}
impl Event for TaskFailed {
fn name(&self) -> &'static str {
"tasks.failed"
}
}