summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-03-11 19:35:35 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-11 19:35:35 +0100
commit28fffbf83443e8d46cae1c33daa468cf2e6fc04a (patch)
tree34a348081074c48bb554418b4e2ac36a7553dfd0
parent4168b117950bce523660c54fa878f50237b082c5 (diff)
downloadjenkins.debian.net-28fffbf83443e8d46cae1c33daa468cf2e6fc04a.tar.xz
reproducible: merge schedule messages into one
-rwxr-xr-xbin/reproducible_scheduler.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py
index afb7809d..d82f596f 100755
--- a/bin/reproducible_scheduler.py
+++ b/bin/reproducible_scheduler.py
@@ -260,6 +260,7 @@ def scheduler():
log.info('Received ' + str(len(old[suite])) + ' old packages in ' + suite + ' to schedule.')
log.info('==============================================================')
+ now_queued_here = {}
for suite in SUITES:
all_scheduled_pkgs = []
all_scheduled_pkgs.extend(untested[suite])
@@ -268,24 +269,25 @@ def scheduler():
query = 'SELECT count(*) ' + \
'FROM schedule AS p JOIN sources AS s ON p.package_id=s.id ' + \
'WHERE s.suite="{suite}"'.format(suite=suite)
- now_queued_here = int(query_db(query)[0][0]) + len(all_scheduled_pkgs)
- # build the final message text
- message = 'Scheduled in ' + suite + ': ' + \
- str(len(untested[suite])) + ' untested packages, ' + \
- str(len(new[suite])) + ' packages with new versions and ' + \
- str(len(old[suite])) + ' with the same version ' + \
- '(total: ' + str(total) + ' of which ' + \
- str(now_queued_here) + ' are in ' + suite + ')'
- kgb = ['kgb-client', '--conf', '/srv/jenkins/kgb/debian-reproducible.conf',
- '--relay-msg']
- kgb.extend(message.split())
+ now_queued_here[suite] = int(query_db(query)[0][0]) + len(all_scheduled_pkgs)
# finally
schedule_packages(all_scheduled_pkgs)
- call(kgb)
- log.info(message)
log.info('### Suite ' + suite + ' done ###')
log.info('==============================================================')
+ # update the scheduled page
build_page('scheduled') # from reproducible_html_indexes, build global page
+ # build the kgb message text
+ message = 'Scheduled in ' + '+'.join(SUITES) + ': ' + \
+ '+'.join([str(untested[x]) for x in SUITES]) + ' new and untested packages, ' + \
+ '+'.join([str(len(new[x])) for x in SUITES]) + ' packages with new versions and ' + \
+ '+'.join([str(len(old[x])) for x in SUITES]) + ' old packages with the same version. ' + \
+ 'Total: ' + str(total) + ' split into ' + \
+ '+'.join([str(now_queued_here[x]) for x in SUITES])
+ log.info(message)
+ kgb = ['kgb-client', '--conf', '/srv/jenkins/kgb/debian-reproducible.conf',
+ '--relay-msg']
+ kgb.extend(message.split())
+ call(kgb)
log.info('\n\n\n')
log.info(message)