ArielGlenn has submitted this change and it was merged.

Change subject: onallwikis: allow query to include wiki name in string
......................................................................


onallwikis: allow query to include wiki name in string

Change-Id: Iad0be5ad507c5c46685a15bb0d9b407567d3abed
---
M xmldumps-backup/onallwikis.py
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  ArielGlenn: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/xmldumps-backup/onallwikis.py b/xmldumps-backup/onallwikis.py
index 06ea30b..30700f8 100644
--- a/xmldumps-backup/onallwikis.py
+++ b/xmldumps-backup/onallwikis.py
@@ -120,7 +120,8 @@
             compress = ""
         pipeto = "%s > %s" % (compress, outfile_path)
 
-        return dbserver.build_sql_command(self.query, pipeto)
+        query = self.query.format(w=wiki.db_name)
+        return dbserver.build_sql_command(query, pipeto)
 
     def run(self, wiki, filenameformat, output_dir, overwrite):
         '''
@@ -294,6 +295,8 @@
                       option is also not supplied, the 'queryfile' option
                       in the config file will be checked and that file read
                       for the contents of the query.
+                      Query string may have '{w}' in it for substituting the
+                      wikiname.
 --wikiname       (w): Run the query only for the specific wiki
 --retries        (r): Number of times to try running the query on all wikis
                       in case of error, before giving up

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad0be5ad507c5c46685a15bb0d9b407567d3abed
Gerrit-PatchSet: 2
Gerrit-Project: operations/dumps
Gerrit-Branch: ariel
Gerrit-Owner: ArielGlenn <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to