From afccf9d7bbdb3db44208ede13cc837ca9c1e2196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arma=C3=ABl=20Gu=C3=A9neau?= Date: Wed, 10 Apr 2024 18:22:41 +0200 Subject: [PATCH] small fix to state.toml updates --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8eee7dc..3ba0414 100644 --- a/src/main.rs +++ b/src/main.rs @@ -233,9 +233,9 @@ async fn check_repo(client: &s3::Client, state: &mut State, repo: &str) -> eyre: if alert { println!("Sending alert to {} about bucket {}", config.email, repo); send_email(&config.email, repo, inactivity).await?; + state.update_last_alert(repo); + write_state(client, state).await?; } - state.update_last_alert(repo); - write_state(client, state).await?; Ok(Some(AlertStatus { alert, inactivity, last_alert })) } else { Ok(None)