feat: add inner error
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-08-02 09:21:56 +02:00
parent 5190e8a737
commit 989f073061
Signed by: kjuulh
GPG Key ID: D85D7535F18F35FA

View File

@ -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