fix: with child token as well
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-12-13 23:28:44 +01:00
parent 55498adffd
commit 84820dcc82
Signed by: kjuulh
GPG Key ID: D85D7535F18F35FA

View File

@ -37,6 +37,7 @@ where
let start = std::time::Instant::now(); let start = std::time::Instant::now();
tracing::debug!("running job"); tracing::debug!("running job");
let child_token = cancellation_token.child_token();
if let Err(e) = drifter.execute(child_token).await { if let Err(e) = drifter.execute(child_token).await {
tracing::error!("drift job failed with error: {}, stopping routine", e); tracing::error!("drift job failed with error: {}, stopping routine", e);
cancellation_token.cancel(); cancellation_token.cancel();