allow jobs to spawn sub-tasks (#2030)

* allow jobs to spawn sub-tasks

* fix fallout in subsytems
This commit is contained in:
Robert Habermeier
2020-11-28 15:12:43 -05:00
committed by GitHub
parent 0c84214814
commit d6307a4978
5 changed files with 55 additions and 33 deletions
+5 -4
View File
@@ -52,6 +52,7 @@ use polkadot_node_subsystem_util::{
request_from_runtime,
Validator,
delegated_subsystem,
FromJobCommand,
metrics::{self, prometheus},
};
use statement_table::{
@@ -197,9 +198,9 @@ enum FromJob {
StatementDistribution(StatementDistributionMessage),
}
impl From<FromJob> for AllMessages {
fn from(f: FromJob) -> Self {
match f {
impl From<FromJob> for FromJobCommand {
fn from(f: FromJob) -> FromJobCommand {
FromJobCommand::SendMessage(match f {
FromJob::AvailabilityStore(msg) => AllMessages::AvailabilityStore(msg),
FromJob::RuntimeApiMessage(msg) => AllMessages::RuntimeApi(msg),
FromJob::CandidateValidation(msg) => AllMessages::CandidateValidation(msg),
@@ -207,7 +208,7 @@ impl From<FromJob> for AllMessages {
FromJob::StatementDistribution(msg) => AllMessages::StatementDistribution(msg),
FromJob::PoVDistribution(msg) => AllMessages::PoVDistribution(msg),
FromJob::Provisioner(msg) => AllMessages::Provisioner(msg),
}
})
}
}