diff options
author | Holger Levsen <holger@layer-acht.org> | 2016-01-18 19:42:15 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-01-18 19:42:15 +0100 |
commit | 04408e63e4f70e147901cc88269f0423cda0a2b8 (patch) | |
tree | e4e83c6cf1f4095c4a05d29396b58aa80276a17d /bin | |
parent | d739c6d4a26374a4c5991f3ae035712610a4f6c7 (diff) | |
download | jenkins.debian.net-04408e63e4f70e147901cc88269f0423cda0a2b8.tar.xz |
reproducible: merge the two irc notifications for amd64+armhf into one
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_scheduler.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py index e705a587..b9dece33 100755 --- a/bin/reproducible_scheduler.py +++ b/bin/reproducible_scheduler.py @@ -541,8 +541,8 @@ def scheduler(arch): schedule_packages(to_be_scheduled) # update the scheduled page generate_schedule(arch) # from reproducible_html_indexes - # build the kgb message text - message = 'Scheduled in ' + '+'.join(SUITES) + ' (' + arch + '): ' + # build the message text for this arch + message = ' - ' + arch + ': ' if msg_untested: message += msg_untested + ', ' if msg_new: @@ -557,15 +557,13 @@ def scheduler(arch): message += ' for ' + str(sum(total)) message += ' or ' + '+'.join([str(now_queued_here[x]) for x in SUITES]) message += ' packages in total.' + log.info('Scheduling for architecture ' + arch + ' done.') + log.info('--------------------------------------------------------------') # only notifiy irc if there were packages scheduled in any suite for x in SUITES: if len(untested[x])+len(new[x])+len(old[x])+len(old_ftbfs_and_depwait[x]) > 0: - log.info(message) - irc_msg(message) - break - log.info('Scheduling for architecture ' + arch + ' done.') - log.info('--------------------------------------------------------------') - + return message + return '' if __name__ == '__main__': log.info('Updating sources tables for all suites.') @@ -575,6 +573,7 @@ if __name__ == '__main__': query = 'SELECT count(*) ' + \ 'FROM schedule AS p JOIN sources AS s ON s.id=p.package_id ' + \ 'WHERE s.architecture="{}"' + message = '' for arch in ARCHS: log.info('Scheduling for %s...', arch) overall = int(query_db(query.format(arch))[0][0]) @@ -583,4 +582,9 @@ if __name__ == '__main__': continue log.info('%s packages already scheduled for %s, probably scheduling some ' 'more...', overall, arch) - scheduler(arch) + message += scheduler(arch) + if message != '': + # build the kgb message text + message = 'Scheduled in ' + '+'.join(SUITES) + ':' + message + log.info(message) + irc_msg(message) |