improve appservice service async interfaces
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
b3e5d2f683
commit
ecf20f7ebb
2 changed files with 36 additions and 45 deletions
|
@ -1,5 +1,6 @@
|
|||
use clap::Subcommand;
|
||||
use conduwuit::Result;
|
||||
use futures::TryStreamExt;
|
||||
|
||||
use crate::Command;
|
||||
|
||||
|
@ -31,7 +32,7 @@ pub(super) async fn process(subcommand: AppserviceCommand, context: &Command<'_>
|
|||
},
|
||||
| AppserviceCommand::All => {
|
||||
let timer = tokio::time::Instant::now();
|
||||
let results = services.appservice.all().await;
|
||||
let results: Vec<_> = services.appservice.iter_db_ids().try_collect().await?;
|
||||
let query_time = timer.elapsed();
|
||||
|
||||
write!(context, "Query completed in {query_time:?}:\n\n```rs\n{results:#?}\n```")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue