Skip to content

Commit

Permalink
add delay before sending ping message
Browse files Browse the repository at this point in the history
  • Loading branch information
UpcraftLP committed Dec 18, 2024
1 parent 89dac77 commit 4d02088
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bin/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use regex::Regex;
use std::fs::File;
use std::io::Write;
use std::{env, process};
use std::time::Duration;
use tokio::time::sleep;
use tracing::{debug, error, info};
use tracing_subscriber::prelude::*;
use tracing_subscriber::{fmt, EnvFilter};
Expand Down Expand Up @@ -162,6 +164,9 @@ async fn wrapped_main() -> anyhow::Result<()> {
};

if should_ping_role {
info!("Waiting 5 seconds before pinging notification role");
sleep(Duration::from_secs(5)).await;

info!("Pinging notification role");

let mut role_str = args.discord_notification_role_id;
Expand Down

0 comments on commit 4d02088

Please sign in to comment.