From 9a9ed34c10cd30aa8a79cd6f69c8c7bbd846309e Mon Sep 17 00:00:00 2001 From: Isanka Date: Mon, 25 Mar 2024 00:07:52 +0900 Subject: [PATCH] na --- README.MD | 2 +- historical_data/src/main.rs | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.MD b/README.MD index ca1715f..d6f39c9 100644 --- a/README.MD +++ b/README.MD @@ -2,4 +2,4 @@ Inside "mongo-to-clickhouse" container run this. -./historical_data saikyo 2020-01-01 2021-12-31 \ No newline at end of file +RUST_LOG=info ./historical_data saikyo 2020-01-01 2021-12-31 \ No newline at end of file diff --git a/historical_data/src/main.rs b/historical_data/src/main.rs index ab25e71..0985f63 100644 --- a/historical_data/src/main.rs +++ b/historical_data/src/main.rs @@ -529,7 +529,13 @@ async fn main() -> Result<(), Box> { .unwrap(); }); - tokio::spawn(retry_failed_batches(app_state)); + let handle = tokio::spawn(retry_failed_batches(app_state)); + + if let Err(e) = handle.await { + error!("retry_failed_batches task failed: {}", e); + } else { + info!("Processing finished, exiting..."); + } signal::ctrl_c().await?; info!("Received shutdown signal, shutting down gracefully...");