Skip to content

Commit

Permalink
enh: add sleep to allow logger to flush (#2549)
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanierh authored Nov 14, 2023
1 parent 11b260e commit 4fbb89e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/bin/dust_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2324,6 +2324,10 @@ fn main() {
state.stop_loop().await;

utils::info("[GRACEFUL] Exiting!");

// sleep for 1 second to allow the logger to flush
tokio::time::sleep(std::time::Duration::from_secs(1)).await;

Ok::<(), anyhow::Error>(())
});
}

0 comments on commit 4fbb89e

Please sign in to comment.