summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-09-19 09:28:38 +0200
committerHolger Levsen <holger@layer-acht.org>2015-09-19 09:28:38 +0200
commit32bb7263fa224b122fa89c40e4358fac5e16fd23 (patch)
treead375dd7038806e694357fc3f1df8538abc8153c
parent18eb6e76a871ec5b78cd318a2f22a61a3de2d52d (diff)
downloadjenkins.debian.net-32bb7263fa224b122fa89c40e4358fac5e16fd23.tar.xz
reproducible: introduce MINIMUM_AGE[arch] to avoid rescheduling already tested packages on armhf while we still have untested ones
-rwxr-xr-xbin/reproducible_scheduler.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py
index 9da4a18f..0bd67b46 100755
--- a/bin/reproducible_scheduler.py
+++ b/bin/reproducible_scheduler.py
@@ -58,6 +58,8 @@ else:
So, the 3rd step happens only when there are more than 350 packages queued up.
+Finally, MINIMUM_AGE is respected when scheduling old versions.
+
"""
MAXIMA = {'amd64': 750, 'armhf': 250}
@@ -112,6 +114,8 @@ LIMITS = {
}
}
+# only old packages older than this will be rescheduled
+MINIMUM_AGE = {'amd64': 14, 'armhf': 100}
class Limit:
@@ -370,10 +374,10 @@ def query_old_versions(suite, arch, limit):
FROM sources AS s JOIN results AS r ON s.id = r.package_id
WHERE s.suite='{suite}' AND s.architecture='{arch}'
AND r.status != 'blacklisted'
- AND r.build_date < datetime('now', '-14 day')
+ AND r.build_date < datetime('now', '-{minimum_age} day')
AND s.id NOT IN (SELECT schedule.package_id FROM schedule)
ORDER BY r.build_date
- LIMIT {limit}""".format(suite=suite, arch=arch, limit=limit)
+ LIMIT {limit}""".format(suite=suite, arch=arch, minimum_age=MINIMUM_AGE[arch], limit=limit)
packages = query_db(query)
print_schedule_result(suite, criteria, packages)
return packages