} elseif ( $action === 'repush-abandoned' ) {
$this->repushAbandoned( $queue );
} else {
- $this->error( "Invalid action '$action'.", 1 );
+ $this->fatalError( "Invalid action '$action'." );
}
}
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 );
$queue->push( $job );
++$count;
- if ( ( $count % $this->mBatchSize ) == 0 ) {
+ if ( ( $count % $this->getBatchSize() ) == 0 ) {
$queue->waitForBackups();
}
}
}
}
-$maintClass = "ManageJobs";
+$maintClass = ManageJobs::class;
require_once RUN_MAINTENANCE_IF_MAIN;