Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
5190e8a737
commit
989f073061
@ -5,8 +5,11 @@ use std::future::Future;
|
|||||||
use tokio::time;
|
use tokio::time;
|
||||||
use tokio_util::sync::CancellationToken;
|
use tokio_util::sync::CancellationToken;
|
||||||
|
|
||||||
#[derive(Debug, Clone, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
pub enum DriftError {}
|
pub enum DriftError {
|
||||||
|
#[error("job failed with inner error")]
|
||||||
|
JobError(#[from] anyhow::Error),
|
||||||
|
}
|
||||||
|
|
||||||
pub fn schedule<F, Fut>(interval: Duration, func: F) -> CancellationToken
|
pub fn schedule<F, Fut>(interval: Duration, func: F) -> CancellationToken
|
||||||
where
|
where
|
||||||
|
Loading…
Reference in New Issue
Block a user