[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: update schroots approx 25% of all runs

Holger Levsen holger at moszumanska.debian.org
Wed Mar 11 22:11:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit b026dc385f4d807fbf3f72be0a32fcf4fec592b2
Author: Holger Levsen <holger at layer-acht.org>
Date:   Wed Mar 11 23:09:54 2015 +0100

    reproducible: update schroots approx 25% of all runs
---
 bin/reproducible_scheduler.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py
index 45f5f3f..6f5cdb9 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])

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list