}
public function execute() {
- global $wgCommandLineMode;
-
if ( $this->hasOption( 'procs' ) ) {
$procs = intval( $this->getOption( 'procs' ) );
if ( $procs < 1 || $procs > 1000 ) {
$outputJSON = ( $this->getOption( 'result' ) === 'json' );
$wait = $this->hasOption( 'wait' );
- // Enable DBO_TRX for atomicity; JobRunner manages transactions
- // and works well in web server mode already (@TODO: this is a hack)
- $wgCommandLineMode = false;
-
$runner = new JobRunner( LoggerFactory::getInstance( 'runJobs' ) );
if ( !$outputJSON ) {
$runner->setDebugHandler( [ $this, 'debugInternal' ] );
sleep( 1 );
}
-
- $wgCommandLineMode = true;
}
/**