From 0c216048b53ecbf4fe2cb63f1a03786aed7dadab Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 5 Mar 2024 12:19:25 +0100 Subject: [PATCH] Cap timeout duration --- milli/src/vector/openai.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/milli/src/vector/openai.rs b/milli/src/vector/openai.rs index cfc4b6e83..33442dda4 100644 --- a/milli/src/vector/openai.rs +++ b/milli/src/vector/openai.rs @@ -178,6 +178,8 @@ impl Embedder { retry.into_duration(attempt) } }?; + + let retry_duration = retry_duration.min(std::time::Duration::from_secs(60)); // don't wait more than a minute tracing::warn!( "Attempt #{}, retrying after {}ms.", attempt,