From f11d8459bab0b09a6907131a836de4dc3d0b5355 Mon Sep 17 00:00:00 2001 From: Rahix Date: Thu, 22 May 2025 17:37:45 +0200 Subject: [PATCH] manager: Wait a bit before collecting new issue --- techtree-manager/src/main.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/techtree-manager/src/main.rs b/techtree-manager/src/main.rs index 379d94e..81cb520 100644 --- a/techtree-manager/src/main.rs +++ b/techtree-manager/src/main.rs @@ -51,7 +51,7 @@ async fn run() -> anyhow::Result<()> { let new_comment_id = if meta.action == event_meta::IssueAction::Opened { let res = issue::make_bot_comment(&forgejo, &meta, meta.issue.number).await; - match res { + let id = match res { Ok(id) => Some(id), Err(e) => { log::warn!( @@ -60,7 +60,12 @@ async fn run() -> anyhow::Result<()> { ); None } - } + }; + + log::info!("Waiting for a minute, as the issue is brand new. We will likely catch some more updates this way!"); + tokio::time::sleep(std::time::Duration::from_secs(60)).await; + + id } else { None };