Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/93505


Change subject: Catch all stash errors in cleanup script
......................................................................

Catch all stash errors in cleanup script

bug: 56401
Change-Id: I3dcd8728a46fdcbecbda0bdc6e3aef49e8f41ed8
---
M maintenance/cleanupUploadStash.php
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/05/93505/1

diff --git a/maintenance/cleanupUploadStash.php 
b/maintenance/cleanupUploadStash.php
index c2ba555..ba7c3cf 100644
--- a/maintenance/cleanupUploadStash.php
+++ b/maintenance/cleanupUploadStash.php
@@ -81,10 +81,9 @@
                                try {
                                        $stash->getFile( $key, true );
                                        $stash->removeFileNoAuth( $key );
-                               } catch ( UploadStashBadPathException $ex ) {
-                                       $this->output( "Failed removing stashed 
upload with key: $key\n" );
-                               } catch ( UploadStashZeroLengthFileException 
$ex ) {
-                                       $this->output( "Failed removing stashed 
upload with key: $key\n" );
+                               } catch ( UploadStashException $ex ) {
+                                       $type = get_class( $ex );
+                                       $this->output( "Failed removing stashed 
upload with key: $key ($type)\n" );
                                }
                                if ( $i % 100 == 0 ) {
                                        $this->output( "$i\n" );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3dcd8728a46fdcbecbda0bdc6e3aef49e8f41ed8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

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

Reply via email to