mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
log time that the function took
This commit is contained in:
@@ -448,6 +448,10 @@ impl Context {
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let address = self.get_primary_self_addr().await?;
|
||||||
|
let time_start = std::time::SystemTime::now();
|
||||||
|
info!(self, "background_fetch started fetching {address}");
|
||||||
|
|
||||||
let _pause_guard = self.scheduler.pause(self.clone()).await?;
|
let _pause_guard = self.scheduler.pause(self.clone()).await?;
|
||||||
|
|
||||||
// connection
|
// connection
|
||||||
@@ -467,6 +471,12 @@ impl Context {
|
|||||||
warn!(self, "Failed to update quota: {:#}.", err);
|
warn!(self, "Failed to update quota: {:#}.", err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info!(
|
||||||
|
self,
|
||||||
|
"background_fetch done for {address} took {:?}",
|
||||||
|
time_start.elapsed().unwrap_or_default()
|
||||||
|
);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user