]> git.ipfire.org Git - pbs.git/commitdiff
jobs: Fix sorting jobs
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 27 Apr 2023 10:46:35 +0000 (10:46 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 27 Apr 2023 10:46:35 +0000 (10:46 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/jobs.py

index aaac17b00c3f9b9c5ece89e8a6fd543b447f39c3..7a18f87d818c71962021e2c3d29201ddb8e8cc9c 100644 (file)
@@ -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