add async feature #1
@ -181,8 +181,8 @@ async fn db_writer_task(rx: UnboundedReceiver<Question>) {
|
||||
.unwrap_or_else(|e| panic!("db writer load, {e:#?}"));
|
||||
|
||||
let stream: UnboundedReceiverStream<_> = rx.into();
|
||||
let stream = stream.map(Ok);
|
||||
stream.forward(writer.sink()).await.expect("forward");
|
||||
let stream = stream;
|
||||
writer.load(stream).await.expect("load");
|
||||
writer.finish().await.expect("db writer finish");
|
||||
|
||||
println!("write done");
|
||||
|
Loading…
Reference in New Issue
Block a user