Speed up thumbnail purging a bit for stash script
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 8 Nov 2013 00:28:09 +0000 (16:28 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 8 Nov 2013 00:28:09 +0000 (16:28 -0800)
Change-Id: Ie0f3d5aa505a5c1554d7932d38ba376811590df1

maintenance/cleanupUploadStash.php

index bc43c67..2300694 100644 (file)
@@ -94,7 +94,7 @@ class UploadStashCleanup extends Maintenance {
 
                // Delete all the corresponding thumbnails...
                $dir = $tempRepo->getZonePath( 'thumb' );
-               $iterator = $tempRepo->getBackend()->getFileList( array( 'dir' => $dir ) );
+               $iterator = $tempRepo->getBackend()->getFileList( array( 'dir' => $dir, 'adviseStat' => 1 ) );
                $this->output( "Deleting old thumbnails...\n" );
                $i = 0;
                foreach ( $iterator as $file ) {