From 65b46aba961dca8c2ecc132e47e75935f49ab045 Mon Sep 17 00:00:00 2001 From: Rob Aiken Date: Tue, 3 Dec 2024 14:58:31 +0000 Subject: [PATCH] Adding retries to registry client --- common/lib/dependabot/registry_client.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/lib/dependabot/registry_client.rb b/common/lib/dependabot/registry_client.rb index 34df295e82..488683e767 100644 --- a/common/lib/dependabot/registry_client.rb +++ b/common/lib/dependabot/registry_client.rb @@ -30,7 +30,9 @@ def self.get(url:, headers: {}, options: {}) Excon.get( url, idempotent: true, - **SharedHelpers.excon_defaults({ headers: headers }.merge(options)) + **SharedHelpers.excon_defaults({ headers: headers }.merge(options)), + retry_limit: 3, + retry_interval: 5 ) rescue Excon::Error::Timeout => e cache_error(url, e)