Increase latency before panicking when Minio does not respond
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pierre HUBERT 2024-12-17 21:28:22 +01:00
parent c173e028e6
commit c70d85e0f8

View File

@ -58,11 +58,11 @@ async fn apply_bucket(b: &MinioBucket, client: &Client) -> anyhow::Result<()> {
// Check if Minio is responding // Check if Minio is responding
let mut ready_count = 0; let mut ready_count = 0;
while !service.is_ready().await { while !service.is_ready().await {
if ready_count > 5 { if ready_count > 10 {
panic!("Minio is unreachable!"); panic!("Minio is unreachable!");
} }
ready_count += 1; 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..."); log::warn!("Minio is not responding yet, will try again to connect soon...");
} }