From 32a1966ebfc7548f64fe871ffa2eafab3a41244c Mon Sep 17 00:00:00 2001 From: Bjerg Date: Wed, 15 Feb 2023 04:59:28 +0100 Subject: [PATCH] feat: tell user that we are shutting down (#1360) --- bin/reth/src/runner.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/reth/src/runner.rs b/bin/reth/src/runner.rs index 9f6212663f..e9d5a79181 100644 --- a/bin/reth/src/runner.rs +++ b/bin/reth/src/runner.rs @@ -3,7 +3,7 @@ use futures::pin_mut; use reth_tasks::{TaskExecutor, TaskManager}; use std::{future::Future, time::Duration}; -use tracing::trace; +use tracing::{trace, warn}; /// Used to execute cli commands #[derive(Default, Debug)] @@ -39,6 +39,7 @@ impl CliRunner { // give all tasks that are now being shut down some time to finish before tokio leaks them // see [Runtime::shutdown_timeout](tokio::runtime::Runtime::shutdown_timeout) + warn!(target: "reth::cli", "Received shutdown signal, waiting up to 30 seconds for tasks."); tokio_runtime.shutdown_timeout(Duration::from_secs(30)); Ok(())