From: Michael Tremer Date: Thu, 27 Apr 2023 10:46:35 +0000 (+0000) Subject: jobs: Fix sorting jobs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ead863d0313964390ff58d822eb03543363d9d40;p=pbs.git jobs: Fix sorting jobs Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/jobs.py b/src/buildservice/jobs.py index aaac17b0..7a18f87d 100644 --- a/src/buildservice/jobs.py +++ b/src/buildservice/jobs.py @@ -191,13 +191,8 @@ class Job(base.DataObject): def __lt__(self, other): if isinstance(other, self.__class__): - if not self.test and other.test: - return True - - if self.build == other.build: - return arches.priority(self.arch) < arches.priority(other.arch) - - return self.time_created < other.time_created + # Order by architecture (alphabetically) + return self.arch < other.arch return NotImplemented