X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fjobqueue%2FJobQueueGroup.php;h=756724e123acc45d521c4806101ad9c9d092a3f5;hb=54c93f1d384cd5accd2db2ebbb911e4d627c2980;hp=83e5fb24bff0deddba5bb3edacdc96a2107d25e9;hpb=7ecbff2360a07755f771c648ed1e27ee3dca8ad5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/JobQueueGroup.php b/includes/jobqueue/JobQueueGroup.php index 83e5fb24bf..7bc97d82fe 100644 --- a/includes/jobqueue/JobQueueGroup.php +++ b/includes/jobqueue/JobQueueGroup.php @@ -31,7 +31,7 @@ class JobQueueGroup { /** @var JobQueueGroup[] */ protected static $instances = []; - /** @var ProcessCacheLRU */ + /** @var MapCacheLRU */ protected $cache; /** @var string Wiki domain ID */ @@ -121,7 +121,6 @@ class JobQueueGroup { $services = MediaWikiServices::getInstance(); $conf['stats'] = $services->getStatsdDataFactory(); $conf['wanCache'] = $services->getMainWANObjectCache(); - $conf['stash'] = $services->getMainObjectStash(); return JobQueue::factory( $conf ); } @@ -187,10 +186,6 @@ class JobQueueGroup { /** * Buffer jobs for insertion via push() or call it now if in CLI mode * - * Note that pushLazyJobs() is registered as a deferred update just before - * DeferredUpdates::doUpdates() in MediaWiki and JobRunner classes in order - * to be executed as the very last deferred update (T100085, T154425). - * * @param IJobSpecification|IJobSpecification[] $jobs A single Job or a list of Jobs * @return void * @since 1.26 @@ -214,17 +209,6 @@ class JobQueueGroup { DeferredUpdates::addUpdate( new JobQueueEnqueueUpdate( $this->domain, $jobs ) ); } - /** - * Push all jobs buffered via lazyPush() into their respective queues - * - * @return void - * @since 1.26 - * @deprecated Since 1.33 Not needed anymore - */ - public static function pushLazyJobs() { - wfDeprecated( __METHOD__, '1.33' ); - } - /** * Pop a job off one of the job queues * @@ -286,10 +270,10 @@ class JobQueueGroup { /** * Acknowledge that a job was completed * - * @param Job $job + * @param RunnableJob $job * @return void */ - public function ack( Job $job ) { + public function ack( RunnableJob $job ) { $this->get( $job->getType() )->ack( $job ); } @@ -297,10 +281,10 @@ class JobQueueGroup { * Register the "root job" of a given job into the queue for de-duplication. * This should only be called right *after* all the new jobs have been inserted. * - * @param Job $job + * @param RunnableJob $job * @return bool */ - public function deduplicateRootJob( Job $job ) { + public function deduplicateRootJob( RunnableJob $job ) { return $this->get( $job->getType() )->deduplicateRootJob( $job ); } @@ -413,7 +397,8 @@ class JobQueueGroup { } /** - * @return JobQueue[] + * @return array[] + * @phan-return array}> */ protected function getCoalescedQueues() { global $wgJobTypeConf;