mirror of
https://github.com/chatmail/core.git
synced 2026-05-09 01:46:30 +03:00
api: jsonrpc: add background_fetch_for_all_accounts
This commit is contained in:
@@ -231,6 +231,16 @@ impl CommandApi {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Performs a background fetch for all accounts in parallel with a timeout.
|
||||||
|
async fn background_fetch_for_all_accounts(&self, timeout_in_seconds: f64) -> Result<()> {
|
||||||
|
self.accounts
|
||||||
|
.write()
|
||||||
|
.await
|
||||||
|
.background_fetch_with_timeout(std::time::Duration::from_secs_f64(timeout_in_seconds))
|
||||||
|
.await?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------------------
|
// ---------------------------------------------
|
||||||
// Methods that work on individual accounts
|
// Methods that work on individual accounts
|
||||||
// ---------------------------------------------
|
// ---------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user