From 40998890909f61f42f4a0850166dfbe2cecbcb8a Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 18 May 2015 14:08:05 +0200 Subject: reproducible: shorten irc message --- bin/reproducible_scheduler.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'bin/reproducible_scheduler.py') diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py index 23434149..75b123f6 100755 --- a/bin/reproducible_scheduler.py +++ b/bin/reproducible_scheduler.py @@ -214,6 +214,11 @@ def scheduler_old_versions(suite, limit): print_schedule_result(suite, criteria, packages) return packages +def add_up_numbers(package_type): + package_type_sum = '+'.join([str(len(package_type[x])) for x in SUITES]) + if package_type_sum == '0+0+0': + package_type_sum = '0' + return package_type_sum def scheduler(): query = 'SELECT count(*) ' + \ @@ -290,9 +295,9 @@ def scheduler(): generate_schedule() # from reproducible_html_indexes # build the kgb message text message = 'Scheduled in ' + '+'.join(SUITES) + ': ' + \ - '+'.join([str(len(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, ' + \ + add_up_numbers(untested) + ' new and untested packages, ' + \ + add_up_numbers(new) + ' packages with new versions and ' + \ + add_up_numbers(old) + ' old packages with the same version, ' + \ 'for ' + str(total) + ' or ' + \ '+'.join([str(now_queued_here[x]) for x in SUITES]) + ' packages in total.' log.info('\n\n\n') -- cgit v1.2.3-70-g09d2