Small changes

This commit is contained in:
Alex Auvolat
2021-03-16 16:35:10 +01:00
parent f4346cc5f4
commit 3fadc5cbbd
2 changed files with 26 additions and 23 deletions
+8 -5
View File
@@ -146,16 +146,19 @@ where
.map(|(nodes, items)| self.try_send_and_delete(nodes, items)),
)
.await;
let mut errs = vec![];
for resp in resps {
if let Err(e) = resp {
warn!(
"({}) Unable to send and delete for GC: {}",
self.data.name, e
);
errs.push(e);
}
}
Ok(true)
if errs.is_empty() {
Ok(true)
} else {
Err(Error::Message(errs.into_iter().map(|x| format!("{}", x)).collect::<Vec<_>>().join(", ")))
}
}
async fn try_send_and_delete(