X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fjob%2FJobQueueAggregatorMemc.php;h=9434da04590fc6e18569697948e54b1b9a655d0d;hb=4fe59cd7c2d24ccee9a227d945f5a0791db2fb42;hp=4b82cf925a7a18fca0f1c6d94cdd63941cf329ff;hpb=32b58ee1181f3ee3f295f2099100ef4279116b03;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/job/JobQueueAggregatorMemc.php b/includes/job/JobQueueAggregatorMemc.php index 4b82cf925a..9434da0459 100644 --- a/includes/job/JobQueueAggregatorMemc.php +++ b/includes/job/JobQueueAggregatorMemc.php @@ -91,9 +91,9 @@ class JobQueueAggregatorMemc extends JobQueueAggregator { if ( $this->cache->add( "$key:rebuild", 1, 1800 ) ) { // lock $pendingDbInfo = array( 'pendingDBs' => $this->findPendingWikiQueues(), - 'timestamp' => time() + 'timestamp' => time() ); - for ( $attempts=1; $attempts <= 25; ++$attempts ) { + for ( $attempts = 1; $attempts <= 25; ++$attempts ) { if ( $this->cache->add( "$key:lock", 1, 60 ) ) { // lock $this->cache->set( $key, $pendingDbInfo ); $this->cache->delete( "$key:lock" ); // unlock @@ -108,6 +108,13 @@ class JobQueueAggregatorMemc extends JobQueueAggregator { : array(); // cache is both empty and locked } + /** + * @see JobQueueAggregator::doPurge() + */ + protected function doPurge() { + return $this->cache->delete( $this->getReadyQueueCacheKey() ); + } + /** * @return string */