X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FmanageJobs.php;h=e31f1f92f8b91d05147ac8dfd95135c9f19dc0b7;hp=32333b768bf376b157bdb3c926f5fe18f9415d67;hb=d46835ef4f877b03a9d48aa392dc23ae37042756;hpb=2480aae0c97d822e10b50619e7b48b25c45af073 diff --git a/maintenance/manageJobs.php b/maintenance/manageJobs.php index 32333b768b..e31f1f92f8 100644 --- a/maintenance/manageJobs.php +++ b/maintenance/manageJobs.php @@ -48,7 +48,7 @@ class ManageJobs extends Maintenance { } elseif ( $action === 'repush-abandoned' ) { $this->repushAbandoned( $queue ); } else { - $this->error( "Invalid action '$action'.", 1 ); + $this->fatalError( "Invalid action '$action'." ); } } @@ -60,7 +60,7 @@ class ManageJobs extends Maintenance { private function repushAbandoned( JobQueue $queue ) { $cache = ObjectCache::getInstance( CACHE_DB ); - $key = $cache->makeGlobalKey( 'last-job-repush', $queue->getWiki(), $queue->getType() ); + $key = $cache->makeGlobalKey( 'last-job-repush', $queue->getDomain(), $queue->getType() ); $now = wfTimestampNow(); $lastRepushTime = $cache->get( $key ); @@ -82,7 +82,7 @@ class ManageJobs extends Maintenance { $queue->push( $job ); ++$count; - if ( ( $count % $this->mBatchSize ) == 0 ) { + if ( ( $count % $this->getBatchSize() ) == 0 ) { $queue->waitForBackups(); } } @@ -93,5 +93,5 @@ class ManageJobs extends Maintenance { } } -$maintClass = "ManageJobs"; +$maintClass = ManageJobs::class; require_once RUN_MAINTENANCE_IF_MAIN;