From 310129cffa40d196f674b49a2f6fda6f43bebc3c Mon Sep 17 00:00:00 2001 From: Alex Bundy <abundy@opuslogica.com> Date: Wed, 11 Oct 2023 13:49:30 -0700 Subject: [PATCH] Send slack message when stake adjustments are skipped. --- bot/src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bot/src/main.rs b/bot/src/main.rs index 8795535b..3da2d5ad 100644 --- a/bot/src/main.rs +++ b/bot/src/main.rs @@ -1592,6 +1592,13 @@ fn classify( || too_many_poor_block_producers { notes.push("Stake adjustments skipped this epoch".to_string()); + + if env::var("SEND_SLACK_MESSAGES").is_ok() { + if let Err(e) = send_slack_channel_message(¬es.join("\n")) { + info!("Could not send slack message: {:?}", e); + }; + } + None } else { let mut validator_classifications = HashMap::new();