hunter/main: parallelize processing

This commit is contained in:
Astro 2023-01-22 21:06:00 +01:00
parent e3cfc62949
commit 1499ca9703
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ async fn main() {
firehose.for_each(move |data| {
let trend_setter_tx = trend_setter_tx.clone();
let mut store = store.clone();
async move {
tokio::spawn(async move {
let post = match serde_json::from_slice(&data) {
Ok(post) =>
post,
@ -53,6 +53,6 @@ async fn main() {
}
cave::systemd::watchdog();
}
});
}).await;
}