Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
00adafc5
Unverified
Commit
00adafc5
authored
Nov 03, 2020
by
Bastian Köcher
Committed by
GitHub
Nov 03, 2020
Browse files
Apply suggestions from code review
Co-authored-by:
Peter Goodspeed-Niklaus
<
coriolinus@users.noreply.github.com
>
parent
cb4b5c08
Pipeline
#113015
failed with stages
in 8 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
node/subsystem-util/src/lib.rs
View file @
00adafc5
...
...
@@ -631,7 +631,7 @@ 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
()
{
log
::
debug!
(
"failed to send message to job({}), will remove it"
,
Job
::
NAME
);
log
::
debug!
(
"failed to send message to job
({}), will remove it"
,
Job
::
NAME
);
job
.remove
();
}
}
...
...
@@ -820,7 +820,7 @@ where
.forward
(
drain
())
.await
{
log
::
error!
(
"failed to stop all jobs({}) on conclude signal: {:?}"
,
Job
::
NAME
,
e
);
log
::
error!
(
"failed to stop all jobs
({}) on conclude signal: {:?}"
,
Job
::
NAME
,
e
);
let
e
=
Error
::
from
(
e
);
Self
::
fwd_err
(
None
,
JobsError
::
Utility
(
e
),
err_tx
)
.await
;
}
...
...
@@ -832,7 +832,7 @@ where
match
to_job
.relay_parent
()
{
Some
(
hash
)
=>
jobs
.send_msg
(
hash
,
to_job
)
.await
,
None
=>
log
::
debug!
(
"Trying to send a message to a job({}) without specifying a relay parent."
,
"Trying to send a message to a job
({}) without specifying a relay parent."
,
Job
::
NAME
,
),
}
...
...
@@ -840,7 +840,7 @@ where
}
Ok
(
Signal
(
BlockFinalized
(
_
)))
=>
{}
Err
(
err
)
=>
{
log
::
error!
(
"error receiving message from subsystem context for job({}): {:?}"
,
Job
::
NAME
,
err
);
log
::
error!
(
"error receiving message from subsystem context for job
({}): {:?}"
,
Job
::
NAME
,
err
);
Self
::
fwd_err
(
None
,
JobsError
::
Utility
(
Error
::
from
(
err
)),
err_tx
)
.await
;
return
true
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment