summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_scheduler.py
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-03-11 23:09:54 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-11 23:09:54 +0100
commitb026dc385f4d807fbf3f72be0a32fcf4fec592b2 (patch)
tree00e6dc6afd60ccf225b5d8ae2ab634911b0c5175 /bin/reproducible_scheduler.py
parent849e3757b4c50675fabf667925f7d6ef00ab0942 (diff)
downloadjenkins.debian.net-b026dc385f4d807fbf3f72be0a32fcf4fec592b2.tar.xz
reproducible: update schroots approx 25% of all runs
Diffstat (limited to 'bin/reproducible_scheduler.py')
-rwxr-xr-xbin/reproducible_scheduler.py7
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])