Remove special wait, unneeded for seed

Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
This commit is contained in:
Deirdre Connolly 2019-11-12 16:46:06 -05:00 committed by Deirdre Connolly
parent bdba52936e
commit e5aa02bbd4
1 changed files with 1 additions and 18 deletions

View File

@ -98,30 +98,13 @@ impl Runnable for SeedCmd {
fn run(&self) {
use crate::components::tokio::TokioComponent;
let wait = tokio::future::pending::<()>();
// Combine the seed future with an infinite wait
// so that the program has to be explicitly killed and
// won't die before all tracing messages are written.
let fut = futures::future::join(
async {
match self.seed().await {
Ok(()) => {}
Err(e) => {
// Print any error that occurs.
error!(?e);
}
}
},
wait,
);
let _ = app_reader()
.state()
.components
.get_downcast_ref::<TokioComponent>()
.expect("TokioComponent should be available")
.rt
.block_on(fut);
.block_on(self.seed());
}
}