Skip to content

Commit 1c3b72a

Browse files
committed
feat(server): match optenv32 ABHOST packages to amd64 builders
1 parent ac547f0 commit 1c3b72a

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

server/src/api.rs

+4
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ pub async fn pipeline_status(pool: DbPool) -> anyhow::Result<Vec<PipelineStatus>
356356
*pending.entry("amd64".to_string()).or_default() += pending_noarch;
357357
let running_noarch = *running.get("noarch").unwrap_or(&0);
358358
*running.entry("amd64".to_string()).or_default() += running_noarch;
359+
let pending_noarch = *pending.get("optenv32").unwrap_or(&0);
360+
*pending.entry("amd64".to_string()).or_default() += pending_noarch;
361+
let running_noarch = *running.get("optenv32").unwrap_or(&0);
362+
*running.entry("amd64".to_string()).or_default() += running_noarch;
359363

360364
let mut res = vec![];
361365
for a in ALL_ARCH {

server/src/routes/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ pub async fn dashboard_status(
188188
))
189189
.load::<(String, i64)>(conn)?
190190
{
191-
let arch = if arch == "noarch" {
191+
let arch = if arch == "noarch" || arch == "optenv32" {
192192
"amd64".to_string()
193193
} else {
194194
arch
@@ -205,7 +205,7 @@ pub async fn dashboard_status(
205205
))
206206
.load::<(String, i64)>(conn)?
207207
{
208-
let arch = if arch == "noarch" {
208+
let arch = if arch == "noarch" || arch == "optenv32" {
209209
"amd64".to_string()
210210
} else {
211211
arch
@@ -222,7 +222,7 @@ pub async fn dashboard_status(
222222
))
223223
.load::<(String, i64)>(conn)?
224224
{
225-
let arch = if arch == "noarch" {
225+
let arch = if arch == "noarch" || arch == "optenv32" {
226226
"amd64".to_string()
227227
} else {
228228
arch

server/src/routes/worker.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,11 @@ pub async fn worker_poll(
223223
.into_boxed();
224224
if payload.arch == "amd64" {
225225
// route noarch to amd64
226-
sql = sql.filter(arch.eq(&payload.arch).or(arch.eq("noarch")));
226+
sql = sql.filter(
227+
arch.eq(&payload.arch)
228+
.or(arch.eq("noarch"))
229+
.or(arch.eq("optenv32")),
230+
);
227231
} else {
228232
sql = sql.filter(arch.eq(&payload.arch));
229233
}

0 commit comments

Comments
 (0)