ArielGlenn has submitted this change and it was merged.
Change subject: dumps: on dry run for streaming dumps, no compressors write to
files
......................................................................
dumps: on dry run for streaming dumps, no compressors write to files
Change-Id: I985169e2a774cca9687d30cfe2fafeda8ee576be
---
M xmldumps-backup/xmllogs.py
M xmldumps-backup/xmlstreams.py
M xmldumps-backup/xmlstubs.py
3 files changed, 9 insertions(+), 0 deletions(-)
Approvals:
ArielGlenn: Looks good to me, approved
jenkins-bot: Verified
diff --git a/xmldumps-backup/xmllogs.py b/xmldumps-backup/xmllogs.py
index 32c8538..f9c3bc5 100644
--- a/xmldumps-backup/xmllogs.py
+++ b/xmldumps-backup/xmllogs.py
@@ -26,6 +26,9 @@
outfiles = {'logs': {'name': outfile}}
for filetype in outfiles:
outfiles[filetype]['temp'] = os.path.join(wikiconf.tempDir,
os.path.basename(outfiles[filetype]['name']) + "_tmp")
+ if dryrun:
+ outfiles[filetype]['compr'] = None
+ else:
outfiles[filetype]['compr'] = gzippit(outfiles[filetype]['name'])
script_command = worker.MultiVersion.MWScriptAsArray(wikiconf,
"dumpBackup.php")
diff --git a/xmldumps-backup/xmlstreams.py b/xmldumps-backup/xmlstreams.py
index 2d302ee..10420a0 100644
--- a/xmldumps-backup/xmlstreams.py
+++ b/xmldumps-backup/xmlstreams.py
@@ -74,6 +74,9 @@
do_xml_piece(piece_command, outfiles, dryrun=dryrun)
+ if dryrun:
+ return
+
for filetype in outfiles:
outfiles[filetype]['compr'].stdin.close()
diff --git a/xmldumps-backup/xmlstubs.py b/xmldumps-backup/xmlstubs.py
index 768ff9a..5771c11 100644
--- a/xmldumps-backup/xmlstubs.py
+++ b/xmldumps-backup/xmlstubs.py
@@ -28,6 +28,9 @@
'articles': {'name': articles_file}}
for filetype in outfiles:
outfiles[filetype]['temp'] = os.path.join(wikiconf.tempDir,
os.path.basename(outfiles[filetype]['name']) + "_tmp")
+ if dryrun:
+ outfiles[filetype]['compr'] = None
+ else:
outfiles[filetype]['compr'] = gzippit(outfiles[filetype]['name'])
script_command = worker.MultiVersion.MWScriptAsArray(wikiconf,
"dumpBackup.php")
--
To view, visit https://gerrit.wikimedia.org/r/216539
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I985169e2a774cca9687d30cfe2fafeda8ee576be
Gerrit-PatchSet: 1
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