hunter/main: parallelize processing
This commit is contained in:
parent
e3cfc62949
commit
1499ca9703
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue