Don't hang the overlord when processing incoming events

This commit is contained in:
Mike Dilger 2022-12-30 10:04:38 +13:00
parent 003cb3b3f8
commit 9105602016

View File

@ -471,9 +471,11 @@ impl Overlord {
self.post_reply(content, reply_to).await?;
}
"process_incoming_events" => {
let _ = tokio::spawn(async move {
for (event, url) in GLOBALS.incoming_events.write().await.drain(..) {
crate::process::process_new_event(&event, true, Some(url)).await?;
let _ = crate::process::process_new_event(&event, true, Some(url)).await;
}
});
}
_ => {}
},