manager: Wait a bit before collecting new issue

This commit is contained in:
Rahix 2025-05-22 17:37:45 +02:00
parent 34e9a99d61
commit f11d8459ba

View file

@ -51,7 +51,7 @@ async fn run() -> anyhow::Result<()> {
let new_comment_id = if meta.action == event_meta::IssueAction::Opened { let new_comment_id = if meta.action == event_meta::IssueAction::Opened {
let res = issue::make_bot_comment(&forgejo, &meta, meta.issue.number).await; let res = issue::make_bot_comment(&forgejo, &meta, meta.issue.number).await;
match res { let id = match res {
Ok(id) => Some(id), Ok(id) => Some(id),
Err(e) => { Err(e) => {
log::warn!( log::warn!(
@ -60,7 +60,12 @@ async fn run() -> anyhow::Result<()> {
); );
None 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 { } else {
None None
}; };