public function execute() {
global $wgTitle;
+ if ( wfReadOnly() ) {
+ $this->error( "Unable to run jobs; the wiki is in read-only mode.", 1 ); // die
+ }
+
if ( $this->hasOption( 'procs' ) ) {
$procs = intval( $this->getOption( 'procs' ) );
if ( $procs < 1 || $procs > 1000 ) {
$group = JobQueueGroup::singleton();
do {
$job = ( $type === false )
- ? $group->pop() // job from any queue
+ ? $group->pop( JobQueueGroup::TYPE_DEFAULT, JobQueueGroup::USE_CACHE )
: $group->get( $type )->pop(); // job from a single queue
if ( $job ) { // found a job
// Perform the job (logging success/failure and runtime)...