Unverified Commit 287e6a93 authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

Do not spam when we can not send a message to a job (#2084)

* Do not spam when we can not send a message to a job

There are legal reasons why a job ended. If a job failed, the error is
logged. So, we don't need to log an error when we can not send a message
to a job.

* Review feedback
parent b40c3566
Pipeline #116317 passed with stages
in 25 minutes and 45 seconds
......@@ -610,10 +610,6 @@ impl<Spawner: SpawnNamed, Job: 'static + JobTrait> Jobs<Spawner, Job> {
async fn send_msg(&mut self, parent_hash: Hash, msg: Job::ToJob) {
if let Entry::Occupied(mut job) = self.running.entry(parent_hash) {
if job.get_mut().send_msg(msg).await.is_err() {
tracing::warn!(
job = Job::NAME,
relay_parent = ?parent_hash,
"failed to send message to job, will remove it");
job.remove();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment