Resultification

This commit is contained in:
link2xt
2021-09-04 18:51:59 +00:00
parent 3c43d790a3
commit 5f065b245f
17 changed files with 180 additions and 184 deletions

View File

@@ -98,13 +98,14 @@ fn get_highest_usage<'t>(
impl Context {
// Adds a job to update `quota.recent`
pub(crate) async fn schedule_quota_update(&self) {
job::kill_action(self, Action::UpdateRecentQuota).await;
pub(crate) async fn schedule_quota_update(&self) -> Result<()> {
job::kill_action(self, Action::UpdateRecentQuota).await?;
job::add(
self,
job::Job::new(Action::UpdateRecentQuota, 0, Params::new(), 0),
)
.await;
Ok(())
}
/// Updates `quota.recent`, sets `quota.modified` to the current time