From 5b939243c5447f9019ff8625fcd73230713cc09a Mon Sep 17 00:00:00 2001 From: janskiba Date: Mon, 15 Apr 2024 16:09:50 +0200 Subject: [PATCH] fix: Dockerfile and retry timout --- Dockerfile.local | 2 +- local/src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.local b/Dockerfile.local index 2f8d2ca..fba6422 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -15,7 +15,7 @@ COPY . . RUN cargo build --release --bin local FROM gcr.io/distroless/cc-debian12:debug AS runtime -COPY --from=proxy /usr/local/bin/beam /usr/local/bin/proxy +COPY --from=proxy /usr/local/bin/beam-proxy /usr/local/bin/proxy COPY --from=builder /app/target/release/local /usr/local/bin/ ENV APP_secret-sync_KEY=NotSecret diff --git a/local/src/main.rs b/local/src/main.rs index 9654757..1286d18 100644 --- a/local/src/main.rs +++ b/local/src/main.rs @@ -138,7 +138,7 @@ async fn send_secret_request( } async fn wait_for_beam_proxy() -> beam_lib::Result<()> { - const MAX_RETRIRES: u8 = 10; + const MAX_RETRIRES: u8 = 15; let mut tries = 1; loop { match reqwest::get(format!("{BEAM_PROXY_URL}/v1/health")).await { @@ -150,7 +150,7 @@ async fn wait_for_beam_proxy() -> beam_lib::Result<()> { format!("Proxy reachable but failed to start {}", res.status()).into(), )) } - } + }; tokio::time::sleep(Duration::from_secs(1)).await; } }