mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 19:31:35 +00:00
Defensively format errors in traces to avoid deadlocks
This commit is contained in:
parent
890478e794
commit
51d8621015
2 changed files with 4 additions and 5 deletions
|
@ -6,7 +6,6 @@ use crate::{
|
|||
store::{Identifier, Store},
|
||||
};
|
||||
use futures_util::StreamExt;
|
||||
use tracing::error;
|
||||
|
||||
pub(super) fn perform<'a, R, S>(
|
||||
repo: &'a R,
|
||||
|
@ -39,7 +38,7 @@ where
|
|||
Cleanup::AllVariants => all_variants::<R, S>(repo).await?,
|
||||
},
|
||||
Err(e) => {
|
||||
tracing::warn!("Invalid job: {}", e);
|
||||
tracing::warn!("Invalid job: {}", format!("{}", e));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,7 +68,7 @@ where
|
|||
let span = tracing::error_span!("Error deleting files");
|
||||
span.in_scope(|| {
|
||||
for error in errors {
|
||||
error!("{}", error);
|
||||
tracing::error!("{}", format!("{}" error));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ where
|
|||
}
|
||||
},
|
||||
Err(e) => {
|
||||
tracing::warn!("Invalid job: {}", e);
|
||||
tracing::warn!("Invalid job: {}", format!("{}", e));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ where
|
|||
result
|
||||
}
|
||||
Err(e) => {
|
||||
tracing::warn!("Failed to ingest {}, {:?}", e, e);
|
||||
tracing::warn!("Failed to ingest {}, {}", format!("{}", e), format!("{:?}", e));
|
||||
|
||||
UploadResult::Failure {
|
||||
message: e.to_string(),
|
||||
|
|
Loading…
Reference in a new issue