fix(job-registry): fix error handling*

This commit is contained in:
Edouard Vanbelle
2026-07-27 23:57:43 +02:00
parent f66f7fa31f
commit 24c514fe59
6 changed files with 26 additions and 13 deletions
@@ -608,11 +608,11 @@ impl JobHandler for StorageUsageService {
async fn run(&self, _args: &JobRunArgs) -> JobOutcome {
let drives = match self.update_all_drives_storage_usage().await {
Ok(n) => n,
Err(e) => return JobOutcome::Err(format!("drive reconciliation failed: {e}")),
Err(e) => return JobOutcome::err(format!("drive reconciliation failed: {e}")),
};
let users = match self.update_all_users_storage_usage().await {
Ok(n) => n,
Err(e) => return JobOutcome::Err(format!("user reconciliation failed: {e}")),
Err(e) => return JobOutcome::err(format!("user reconciliation failed: {e}")),
};
JobOutcome::ok_with(
drives + users,