//! A single running job use super::*; use tokio::{ sync::{ mpsc, }, }; /// Commands to interrupt jobs #[derive(Debug,PartialEq,Eq,Hash,Clone)] pub enum Command { /// Start graceful shutdown, wait for children. Stop, /// Stop immediately Abort, /// Interrupt the current iteration, and restart the iterator if needed Reseed(interval::Time), /// Run the command now Oneshot, /// Config reload Reload(context::Context), /// Just restart the iterator Restart, } #[derive(Debug)] pub struct Job { handler: mpsc::Sender, }