2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-12-25 03:51:24 +00:00

Add span to spawned prune task

This commit is contained in:
asonix 2023-12-12 17:43:10 -06:00
parent 91688d1b95
commit 4223d8a36f

View file

@ -7,6 +7,7 @@ use crate::{
};
use futures_util::TryStreamExt;
use reqwest_middleware::ClientWithMiddleware;
use tracing::Instrument;
pub(super) fn perform<'a, R, S>(
repo: &'a R,
@ -198,7 +199,11 @@ where
let repo = repo.clone();
let store = store.clone();
let res = actix_rt::spawn(async move {
let current_span = tracing::Span::current();
let span = tracing::debug_span!(parent: current_span, "ensure details");
let res = actix_rt::spawn(
async move {
let mut count = count;
if let Some(ident) = repo.identifier(hash.clone()).await? {
@ -219,7 +224,9 @@ where
}
Ok(count) as Result<u64, Error>
})
}
.instrument(span),
)
.await;
match res {