[−][src]Trait aprun::ServiceTask
Required methods
fn service_name(&self) -> String
To identify service task
#[must_use]fn run_service_check<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn should_run(&self) -> bool
ServiceTasks are triggered often ( 1s interval ) This method should tell whether run also this ServiceTask in current run.
Provided methods
fn should_run_last_interval(
&self,
last_run: Option<SystemTime>,
interval: Duration
) -> bool
&self,
last_run: Option<SystemTime>,
interval: Duration
) -> bool
Should run when elapsed time from last run is higher then interval