Suggest FlakeHub Cache when hit by 429

This commit is contained in:
Cole Helbling 2025-01-14 13:56:17 -08:00
parent 215dc0d8e9
commit b9f89bd546

View file

@ -624,10 +624,16 @@ impl AtomicCircuitBreaker for AtomicBool {
fn check_err(&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");
let msg = "\
Magic Nix Cache has exceeded GitHub Actions Cache's rate limit. \
Save more time and seamlessly share the builds across your team with FlakeHub Cache. \
See: https://flakehub.com/pricing\
";
println!("::notice::{msg}");
self.store(true, Ordering::Relaxed);
}
}