Don't log an error from outcome worker on graceful exit

This commit is contained in:
Félix Saparelli 2022-01-29 04:13:28 +13:00
parent 328700dd72
commit 12ef0411f8
No known key found for this signature in database
GPG Key ID: B948C4BAE44FC474
1 changed files with 6 additions and 1 deletions

View File

@ -41,7 +41,12 @@ impl OutcomeWorker {
spawn(async move {
let errors_c = this.errors_c.clone();
if let Err(err) = this.apply(outcome.clone()).await {
error!(?err, "outcome applier errored");
if matches!(err, RuntimeError::Exit) {
debug!("propagating graceful exit");
} else {
error!(?err, "outcome applier errored");
}
if let Err(err) = errors_c.send(err).await {
error!(?err, "failed to send an error, something is terribly wrong");
}