Fixed calls to bogus methods in triggerJobs()
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 28 Jul 2014 20:17:31 +0000 (13:17 -0700)
committerOri.livneh <ori@wikimedia.org>
Mon, 28 Jul 2014 20:18:50 +0000 (20:18 +0000)
* Updates some callers that were missed in 094d901b8

Change-Id: Ie425dfdc7da37331e51e3cd8c8f8d890bb5dd6de

includes/MediaWiki.php

index 76530cb..81edc49 100644 (file)
@@ -662,9 +662,9 @@ class MediaWiki {
                }
 
                if ( !$wgRunJobsAsync ) {
-                       // If running jobs asynchronously has been disabled, run the job here
-                       // while the user waits
-                       SpecialRunJobs::executeJobs( $n );
+                       // Fall back to running the job here while the user waits
+                       $runner = new JobRunner();
+                       $runner->run( array( 'maxJobs'  => $n ) );
                        return;
                }
 
@@ -697,7 +697,8 @@ class MediaWiki {
                if ( !$sock ) {
                        wfDebugLog( 'runJobs', "Failed to start cron API (socket error $errno): $errstr\n" );
                        // Fall back to running the job here while the user waits
-                       SpecialRunJobs::executeJobs( $n );
+                       $runner = new JobRunner();
+                       $runner->run( array( 'maxJobs'  => $n ) );
                        return;
                }