[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: merge schedule messages into one
Holger Levsen
holger at moszumanska.debian.org
Wed Mar 11 18:37:37 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 28fffbf83443e8d46cae1c33daa468cf2e6fc04a
Author: Holger Levsen <holger at layer-acht.org>
Date: Wed Mar 11 19:35:35 2015 +0100
reproducible: merge schedule messages into one
---
bin/reproducible_scheduler.py | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py
index afb7809..d82f596 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)
--
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