From 2adcca84ae2f63b843e0677856b099adbdd2a87a Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 17 Jan 2025 13:25:14 +0100 Subject: [PATCH] queue: sort by status first It was sorted by change date before, which does not say when something was merged but when it was commited. At least for me, I want to see if there are any problems and what is currently building when looking at the queue, and only then what already is there. Might be different for other users. Sort by the status priority instead. The priority is the same one used to decide the most important build status to show in the list for the different build types. --- app/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/web.py b/app/web.py index d695092..24e58a9 100644 --- a/app/web.py +++ b/app/web.py @@ -693,7 +693,7 @@ async def queue(request: Request, response: Response, build_type: str = "") -> R updates: list[UpdateEntry] = [] updates = list(grouped.values()) updates.sort( - key=lambda i: (i[0].date, i[0].pkgbase, i[0].pkgname), + key=lambda i: (get_status_priority(i[3][0].status), i[0].date, i[0].pkgbase, i[0].pkgname), reverse=True) # get all packages in the pacman repo which are no in GIT