ArielGlenn has uploaded a new change for review.
https://gerrit.wikimedia.org/r/276905
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(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/dumps
refs/changes/05/276905/1
diff --git a/xmldumps-backup/onallwikis.py b/xmldumps-backup/onallwikis.py
index 06ea30b..a5bd5f3 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=self.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: newchange
Gerrit-Change-Id: Iad0be5ad507c5c46685a15bb0d9b407567d3abed
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: ariel
Gerrit-Owner: ArielGlenn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits