Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/327421 )
Change subject: scap clean: provide l10n-only option for pruning stuff ...................................................................... scap clean: provide l10n-only option for pruning stuff Change-Id: If43d185beed733ad1437a0dd3c2976037dcd1171 --- M scap/plugins/clean.py 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/21/327421/1 diff --git a/scap/plugins/clean.py b/scap/plugins/clean.py index 495f2ce..c999f7f 100644 --- a/scap/plugins/clean.py +++ b/scap/plugins/clean.py @@ -12,6 +12,8 @@ """ Scap sub-command to clean old branches """ @cli.argument('branch', help='The name of the branch to clean.') + @cli.argument('--l10n-only', action='store_true', + help='Only prune old l10n cache files.') def main(self, *extra_args): """ Clean old branches from the cluster for space savings! """ @@ -41,5 +43,7 @@ '%d apaches had clean errors', failed) def _clean_command(self, location): - return 'rm -fR %s' % os.path.join( - location, 'php-%s' % self.arguments.branch) + path = os.path.join(location, 'php-%s' % self.arguments.branch) + if self.arguments.l10n_only: + path = os.path.join(path, 'cache', 'l10n', '*.cdb') + return 'rm -fR %s' % path -- To view, visit https://gerrit.wikimedia.org/r/327421 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If43d185beed733ad1437a0dd3c2976037dcd1171 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad <ch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits