X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdeleteImageMemcached.php;h=835de352d239e7f7060db20c4c07774244f92e08;hb=6656ccb489919326bf043b5b599d449b201c4388;hp=3c8c5fdd8833d2f4dd6024cd1b2ae76cef8283d7;hpb=001152e597390a45bffb9a60bf7ff4cd4009be88;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/deleteImageMemcached.php b/maintenance/deleteImageMemcached.php index 3c8c5fdd88..835de352d2 100644 --- a/maintenance/deleteImageMemcached.php +++ b/maintenance/deleteImageMemcached.php @@ -24,7 +24,7 @@ * @ingroup Maintenance */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script that deletes image information from the object cache. @@ -59,13 +59,15 @@ class DeleteImageCache extends Maintenance { $total = $this->getImageCount(); foreach ( $res as $row ) { - if ( $i % $this->report == 0 ) + if ( $i % $this->report == 0 ) { $this->output( sprintf( "%s: %13s done (%s)\n", wfWikiID(), "$i/$total", wfPercent( $i / $total * 100 ) ) ); + } $md5 = md5( $row->img_name ); $wgMemc->delete( wfMemcKey( 'Image', $md5 ) ); - if ( $sleep != 0 ) + if ( $sleep != 0 ) { usleep( $sleep ); + } ++$i; } @@ -78,4 +80,4 @@ class DeleteImageCache extends Maintenance { } $maintClass = "DeleteImageCache"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;