small fix to state.toml updates

This commit is contained in:
Armaël Guéneau 2024-04-10 18:22:41 +02:00
parent 0cd9b245f3
commit afccf9d7bb

View file

@ -233,9 +233,9 @@ async fn check_repo(client: &s3::Client, state: &mut State, repo: &str) -> eyre:
if alert { if alert {
println!("Sending alert to {} about bucket {}", config.email, repo); println!("Sending alert to {} about bucket {}", config.email, repo);
send_email(&config.email, repo, inactivity).await?; 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 })) Ok(Some(AlertStatus { alert, inactivity, last_alert }))
} else { } else {
Ok(None) Ok(None)