mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +00:00
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:
@@ -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) {
|
async fn send_msg(&mut self, parent_hash: Hash, msg: Job::ToJob) {
|
||||||
if let Entry::Occupied(mut job) = self.running.entry(parent_hash) {
|
if let Entry::Occupied(mut job) = self.running.entry(parent_hash) {
|
||||||
if job.get_mut().send_msg(msg).await.is_err() {
|
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();
|
job.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user