From 32bb7263fa224b122fa89c40e4358fac5e16fd23 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 19 Sep 2015 09:28:38 +0200 Subject: reproducible: introduce MINIMUM_AGE[arch] to avoid rescheduling already tested packages on armhf while we still have untested ones --- bin/reproducible_scheduler.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bin/reproducible_scheduler.py') 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 -- cgit v1.2.3-54-g00ecf