From c70d85e0f84ba0608921312c682d9d7a627e2f18 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 17 Dec 2024 21:28:22 +0100 Subject: [PATCH] Increase latency before panicking when Minio does not respond --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 409d751..3e4b9be 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,11 +58,11 @@ async fn apply_bucket(b: &MinioBucket, client: &Client) -> anyhow::Result<()> { // Check if Minio is responding let mut ready_count = 0; while !service.is_ready().await { - if ready_count > 5 { + if ready_count > 10 { panic!("Minio is unreachable!"); } ready_count += 1; - tokio::time::sleep(Duration::from_millis(200)).await; + tokio::time::sleep(Duration::from_millis(500)).await; log::warn!("Minio is not responding yet, will try again to connect soon..."); }