Skip to content

Commit

Permalink
fix: fix dashboard stats for noarch jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Mar 23, 2024
1 parent 9d1066f commit 13678b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/src/routes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub async fn dashboard_status(
} else {
arch
};
by_arch.entry(arch).or_default().total_job_count = count;
by_arch.entry(arch).or_default().total_job_count += count;
}

for (arch, count) in crate::schema::jobs::dsl::jobs
Expand All @@ -188,7 +188,7 @@ pub async fn dashboard_status(
} else {
arch
};
by_arch.entry(arch).or_default().pending_job_count = count;
by_arch.entry(arch).or_default().pending_job_count += count;
}

for (arch, count) in crate::schema::jobs::dsl::jobs
Expand All @@ -205,7 +205,7 @@ pub async fn dashboard_status(
} else {
arch
};
by_arch.entry(arch).or_default().running_job_count = count;
by_arch.entry(arch).or_default().running_job_count += count;
}

Ok(DashboardStatusResponse {
Expand Down

0 comments on commit 13678b3

Please sign in to comment.