diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_html_live_status.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/reproducible_html_live_status.py b/bin/reproducible_html_live_status.py index 2f044c67..00eb8e26 100755 --- a/bin/reproducible_html_live_status.py +++ b/bin/reproducible_html_live_status.py @@ -10,7 +10,7 @@ from reproducible_common import * from reproducible_html_indexes import build_leading_text_section - +import glob def generate_schedule(arch): """ the schedule pages are very different than others index pages """ @@ -64,11 +64,14 @@ def generate_live_status_table(arch): html += '<th>previous build duration</th><th>average build duration</th><th>builder job</th>' html += '</tr>\n' counter = 0 + # the path should probably not be hard coded here… + builders = len(glob.glob('/var/lib/jenkins/jobs/reproducible_builder_' + arch + '_*')) for row in rows: counter += 1 - # FIXME: the numbers 32 and 15 should really be derived from /var/lib/jenkins/jobs/reproducible_builder_${arch}_* instead of being hard-coded here... - if ( arch == 'amd64' and counter > 32 ) or ( arch == 'armhf' and counter > 15 ): - html += '<tr><td colspan="10">There are more builds marked as currently building in the database than there are ' + arch + ' build jobs. This does not compute, please investigate and fix the cause.</td></tr>' + if counter > builders: + html += '<tr><td colspan="10">There are more builds marked as currently building in the database (' + counter + ') than there are ' + arch + ' build jobs (' + builders + '). This does not compute, please investigate and fix the cause.</td></tr>' + elif builders == 0: + html += '<tr><td colspan="10">0 build jobs for ' + arch + ' detected. This does not compute, please investigate and fix the cause.</td></tr>' suite = row[1] arch = row[2] pkg = row[3] |