forked from NationTech/harmony
make instrumentation sync instead of async to avoid concurrency issues
This commit is contained in:
@@ -115,7 +115,7 @@ pub async fn run_cli<T: Topology + Send + Sync + 'static>(
|
||||
scores: Vec<Box<dyn Score<T>>>,
|
||||
args: Args,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let cli_logger_handle = cli_logger::init();
|
||||
cli_logger::init();
|
||||
|
||||
let mut maestro = Maestro::initialize(inventory, topology).await.unwrap();
|
||||
maestro.register_all(scores);
|
||||
@@ -123,7 +123,6 @@ pub async fn run_cli<T: Topology + Send + Sync + 'static>(
|
||||
let result = init(maestro, args).await;
|
||||
|
||||
instrumentation::instrument(instrumentation::HarmonyEvent::HarmonyFinished).unwrap();
|
||||
let _ = tokio::try_join!(cli_logger_handle);
|
||||
result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user