diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-03-11 23:09:54 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-03-11 23:09:54 +0100 |
commit | b026dc385f4d807fbf3f72be0a32fcf4fec592b2 (patch) | |
tree | 00e6dc6afd60ccf225b5d8ae2ab634911b0c5175 /bin | |
parent | 849e3757b4c50675fabf667925f7d6ef00ab0942 (diff) | |
download | jenkins.debian.net-b026dc385f4d807fbf3f72be0a32fcf4fec592b2.tar.xz |
reproducible: update schroots approx 25% of all runs
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_scheduler.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py index 45f5f3f0..6f5cdb97 100755 --- a/bin/reproducible_scheduler.py +++ b/bin/reproducible_scheduler.py @@ -13,6 +13,7 @@ import sys import gzip import deb822 import aptsources.sourceslist +import random from time import sleep from random import randint from subprocess import call @@ -291,6 +292,11 @@ def scheduler(): if __name__ == '__main__': + # scheduler is called 4 times per hour, so we only update the schroots roughly every 4th time + if random.randrange(1,5) == 4: + log.info('Updating schroots for all suites.') + for suite in SUITES: + call_apt_update(suite) overall = int(query_db('SELECT count(*) FROM schedule')[0][0]) if overall > 250: build_page('scheduled') # from reproducible_html_indexes @@ -298,7 +304,6 @@ if __name__ == '__main__': sys.exit() log.info(str(overall) + ' packages already scheduled, scheduling some more...') for suite in SUITES: - call_apt_update(suite) update_sources_tables(suite) scheduler() overall = int(query_db('SELECT count(*) FROM schedule')[0][0]) |