From 9fb5fe1d991b856c440ba2ff4b1596aa3bedf71c Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 11 Sep 2015 01:17:30 +0200 Subject: reproducible: include live_status in scheduled page --- bin/reproducible_html_live_status.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_html_live_status.py b/bin/reproducible_html_live_status.py index 8d6ea072..d8808a0b 100755 --- a/bin/reproducible_html_live_status.py +++ b/bin/reproducible_html_live_status.py @@ -22,6 +22,7 @@ def generate_schedule(arch): html = '' rows = query_db(query.format(arch=arch)) html += build_leading_text_section({'text': text}, rows, defaultsuite, arch) + html += generate_live_status_table(arch) html += '

\n' + tab html += '' html += '\n' @@ -39,10 +40,7 @@ def generate_schedule(arch): log.info("Page generated at " + desturl) -def generate_live_status(arch): - """ the schedule pages are very different than others index pages """ - log.info('Building live status page...') - title = 'Live status of reproducible.debian.net' +def generate_live_status_table(arch): query = 'SELECT s.id, s.name, s.version, s.suite, s.architecture, ' + \ 'p.scheduler, p.date_scheduled, p.date_build_started, ' + \ 'r.status, r.version, r.build_duration, p.builder, p.notify ' + \ @@ -51,7 +49,7 @@ def generate_live_status(arch): 'ORDER BY p.date_build_started DESC' html = '' rows = query_db(query.format(arch=arch)) - html += '

If there are more than 21 rows shown here, the list includes stale builds... we\'re working on it. Stay tuned.

#scheduled atsuitearchitecturesource package
\n' + tab + html += '

\n' + tab html += '' html += '' html += '' @@ -70,13 +68,9 @@ def generate_live_status(arch): html += '' html += '\n' html += '
#src pkg idnameversionsuitearchscheduled byscheduled onbuild startedstatus' + str(row[10]) + '' + str(row[11]) + '' + str(row[12]) + '

\n' - destfile = BASE + '/live_status.html' - desturl = REPRODUCIBLE_URL + '/live_status.html' - write_html_page(title=title, body=html, destfile=destfile) - log.info("Page generated at " + desturl) + return html if __name__ == '__main__': - generate_live_status("*") for arch in ARCHS: generate_schedule(arch) -- cgit v1.2.3-70-g09d2