ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345958 )

Change subject: update dumpadmin to use the new json reporting routines
......................................................................

update dumpadmin to use the new json reporting routines

Change-Id: Iac7fb0ed764064d16736d6cac6235e565ac19025
---
M xmldumps-backup/dumpadmin.py
1 file changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/58/345958/1

diff --git a/xmldumps-backup/dumpadmin.py b/xmldumps-backup/dumpadmin.py
index 5128802..c6245e2 100644
--- a/xmldumps-backup/dumpadmin.py
+++ b/xmldumps-backup/dumpadmin.py
@@ -412,7 +412,7 @@
         if not self.dryrun:
             for item in runner.dump_item_list.dump_items:
                 if item.status() == "done":
-                    runner.dumpjobdata.do_after_job(item)
+                    runner.dumpjobdata.do_after_job(item, 
runner.dump_item_list.dump_items)
 
         if self.dryrun:
             print "would update dumpruninfo file, checksums file, ",
@@ -426,10 +426,10 @@
 
         if runner.dump_item_list.all_possible_jobs_done():
             # All jobs are either in status "done", "waiting", "failed", 
"skipped"
-            runner.indexhtml.update_index_html("done")
+            runner.report.update_index_html_and_json("done")
             runner.statushtml.update_status_file("done")
         else:
-            runner.indexhtml.update_index_html("partialdone")
+            runner.report.update_index_html_and_json("partialdone")
             runner.statushtml.update_status_file("partialdone")
 
         if rerun:
@@ -449,7 +449,7 @@
         for item in runner.dump_item_list.dump_items:
             if item.to_run():
                 item.start()
-                runner.indexhtml.update_index_html()
+                runner.report.update_index_html_and_json()
                 runner.statushtml.update_status_file()
                 
runner.dumpjobdata.do_before_job(runner.dump_item_list.dump_items)
                 try:
@@ -484,14 +484,14 @@
 
         if runner.dump_item_list.all_possible_jobs_done():
             # All jobs are either in status "done", "waiting", "failed", 
"skipped"
-            runner.indexhtml.update_index_html_file("done")
+            runner.report.update_index_html_file_and_json("done")
             runner.statushtml.update_status_file("done")
         else:
             # This may happen if we start a dump now and abort before all 
items are
             # done. Then some are left for example in state "waiting". When
             # afterwards running a specific job, all (but one) of the jobs
             # previously in "waiting" are still in status "waiting"
-            runner.indexhtml.update_index_html("partialdone")
+            runner.report.update_index_html_file_and_json("partialdone")
             runner.statushtml.update_status_file("partialdone")
 
         runner.dumpjobdata.do_after_dump(runner.dump_item_list.dump_items)
@@ -617,7 +617,7 @@
             if item.name() == job:
                 item.set_status(status, True)
             if item.status() == "done":
-                runner.dumpjobdata.do_after_job(item)
+                runner.dumpjobdata.do_after_job(item, 
runner.dump_item_list.dump_items)
             elif item.status() not in ["done", "waiting", "skipped"]:
                 runner.failurehandler.failure_count += 1
 
@@ -625,10 +625,10 @@
             print "updating status files for wiki", wiki.db_name
         if runner.dump_item_list.all_possible_jobs_done():
             # All jobs are either in status "done", "waiting", "failed", 
"skipped"
-            runner.indexhtml.update_index_html("done")
+            runner.report.update_index_html_and_json("done")
             runner.statushtml.update_status_file("done")
         else:
-            runner.indexhtml.update_index_html("partialdone")
+            runner.report.update_index_html_and_json("partialdone")
             runner.statushtml.update_status_file("partialdone")
 
         runner.dumpjobdata.do_after_dump(runner.dump_item_list.dump_items)

-- 
To view, visit https://gerrit.wikimedia.org/r/345958
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac7fb0ed764064d16736d6cac6235e565ac19025
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn <ar...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to