X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fjobqueue%2FJobQueueGroup.php;h=dbb85d7327652bddd4c07b9a27fac73bdd16df2c;hb=4d78d40d821227a9368e87306f447ffd3be5db88;hp=16908a7a84666d092072c898f11f1378be935ff6;hpb=96764fbc9a67fa6040c6123d31ac3746fc6fd98f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/JobQueueGroup.php b/includes/jobqueue/JobQueueGroup.php index 16908a7a84..dbb85d7327 100644 --- a/includes/jobqueue/JobQueueGroup.php +++ b/includes/jobqueue/JobQueueGroup.php @@ -104,7 +104,7 @@ class JobQueueGroup { * This inserts the jobs into the queue specified by $wgJobTypeConf * and updates the aggregate job queue information cache as needed. * - * @param Job|array $jobs A single Job or a list of Jobs + * @param Job|Job[] $jobs A single Job or a list of Jobs * @throws MWException * @return void */ @@ -220,12 +220,10 @@ class JobQueueGroup { public function waitForBackups() { global $wgJobTypeConf; - wfProfileIn( __METHOD__ ); // Try to avoid doing this more than once per queue storage medium foreach ( $wgJobTypeConf as $type => $conf ) { $this->get( $type )->waitForBackups(); } - wfProfileOut( __METHOD__ ); } /** @@ -389,6 +387,10 @@ class JobQueueGroup { } } + if ( $count === 0 ) { + return $count; // nothing to update + } + $wgMemc->merge( $key, function ( $cache, $key, $lastRuns ) use ( $tasksRun ) { if ( is_array( $lastRuns ) ) { foreach ( $tasksRun as $type => $tasks ) {