X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrunJobs.php;h=9f5f1afd2378843e02045ab4db8af83cb99153f7;hb=b74192bc79b2b581f82b4bd90166e72bcf62dbed;hp=af2a318bac5a9e6339e4affc3ca27278e508c5c1;hpb=c76ed91766ccb81e8f0b201690d8ef8d0adfc0da;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php index af2a318bac..9f5f1afd23 100644 --- a/maintenance/runJobs.php +++ b/maintenance/runJobs.php @@ -59,7 +59,7 @@ class RunJobs extends Maintenance { if ( $this->hasOption( 'procs' ) ) { $procs = intval( $this->getOption( 'procs' ) ); if ( $procs < 1 || $procs > 1000 ) { - $this->error( "Invalid argument to --procs", true ); + $this->fatalError( "Invalid argument to --procs" ); } elseif ( $procs != 1 ) { $fc = new ForkController( $procs ); if ( $fc->start() != 'child' ) { @@ -99,6 +99,10 @@ class RunJobs extends Maintenance { $response['reached'] === 'job-limit' || $response['reached'] === 'memory-limit' ) { + // If job queue is empty, output it + if ( $response['jobs'] === [] ) { + $this->output( "Job queue is empty.\n" ); + } break; } @@ -118,5 +122,5 @@ class RunJobs extends Maintenance { } } -$maintClass = "RunJobs"; +$maintClass = RunJobs::class; require_once RUN_MAINTENANCE_IF_MAIN;