summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-06-12 18:52:18 +0200
committerHolger Levsen <holger@layer-acht.org>2015-06-12 20:02:13 +0200
commitb7198e0e12e5a3a89932f74752640c817cbdf923 (patch)
treed4e4ce29b9668c488d25a172624eba3941db948d
parent2cf02eb91a4661a923d20df224aa577bd88d0683 (diff)
downloadjenkins.debian.net-b7198e0e12e5a3a89932f74752640c817cbdf923.tar.xz
reproducible: scheduler: simplify the suite prioritaizing code
-rwxr-xr-xbin/reproducible_scheduler.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py
index f01c78da..1f6500bd 100755
--- a/bin/reproducible_scheduler.py
+++ b/bin/reproducible_scheduler.py
@@ -295,12 +295,7 @@ def scheduler():
now_queued_here = {}
# make sure to schedule packages in unstable first
- # (but keep the view ordering everywhere else)
- priotized_suite_order = ['unstable']
- for suite in SUITES:
- if suite not in priotized_suite_order:
- priotized_suite_order.append(suite)
- for suite in priotized_suite_order:
+ for suite in sorted(SUITES, key=lambda x: x != 'unstable')
query = 'SELECT count(*) ' + \
'FROM schedule AS p JOIN sources AS s ON p.package_id=s.id ' + \
'WHERE s.suite="{suite}"'.format(suite=suite)