From c98d03cbcac8317c4218590474996f3b917a7db1 Mon Sep 17 00:00:00 2001 From: Guocork Date: Fri, 6 Sep 2024 14:18:58 +0800 Subject: [PATCH] handle little case --- controllers/src/main.rs | 2 +- controllers/src/timeout_controller.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/src/main.rs b/controllers/src/main.rs index e8ac27b..c57b32e 100644 --- a/controllers/src/main.rs +++ b/controllers/src/main.rs @@ -58,7 +58,7 @@ async fn main() -> anyhow::Result<()> { _ = actor_controller::new(&ctx) => tracing::warn!("actor controller exited"), _ = credentials_watcher::new(&ctx) => tracing::warn!("credentials watcher exited"), _ = namespace_watcher::new(&ctx) => tracing::warn!("namespace watcher exited"), - _ = timeout_controller::new(&ctx) => tracing::warn!("timeout_controller exited") + _ = timeout_controller::new(&ctx) => tracing::warn!("timeout controller exited") } Ok(()) diff --git a/controllers/src/timeout_controller.rs b/controllers/src/timeout_controller.rs index 8fc49c8..c7f29d7 100644 --- a/controllers/src/timeout_controller.rs +++ b/controllers/src/timeout_controller.rs @@ -60,7 +60,7 @@ pub async fn new(ctx: &Arc) { error!("Failed to wait until ready: {:?}", e); return; } - info!("Timeout_controller is running..."); + info!("Timeout controller is running..."); loop { for p in reader.state() { if let Err(err) = handle(p.as_ref(), &client).await { @@ -95,7 +95,7 @@ async fn handle(playbook: &Playbook, client: &Client) -> anyhow::Result<()> { } }, Strategy::Remain(time) => { - if time <= Duration::days(3) { + if time == Duration::days(3) { send_message().await; } },