From 56d600d74b87130405f7901175d739242cf690b3 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Wed, 12 Jun 2024 16:33:58 -0400 Subject: [PATCH] I hatethis --- gha-cache/src/api.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gha-cache/src/api.rs b/gha-cache/src/api.rs index 3b26341..31a6f2d 100644 --- a/gha-cache/src/api.rs +++ b/gha-cache/src/api.rs @@ -281,15 +281,15 @@ impl Api { } fn circuit_breaker_trip_on_429(&self, e: &Error) { - if let Error::ApiError { - status: reqwest::StatusCode::TOO_MANY_REQUESTS, - info: ref _info, - } = e - { - tracing::info!("Disabling GitHub Actions Cache due to 429: Too Many Requests"); - self.circuit_breaker_429_tripped - .store(true, Ordering::Relaxed); - } + if let Error::ApiError { + status: reqwest::StatusCode::TOO_MANY_REQUESTS, + info: ref _info, + } = e + { + tracing::info!("Disabling GitHub Actions Cache due to 429: Too Many Requests"); + self.circuit_breaker_429_tripped + .store(true, Ordering::Relaxed); + } } /// Mutates the cache version/namespace.