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
This commit is contained in:
Bastian Köcher
2020-12-07 21:57:49 +01:00
committed by GitHub
parent 79a5b12dc1
commit c74537fefd
-4
View File
@@ -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();
}
}