25use Wikimedia\Assert\Assert;
35 private $jobsByDomain;
38 private $jobQueueGroupFactory;
45 $this->jobsByDomain[$domain] = $jobs;
47 $this->jobQueueGroupFactory = MediaWikiServices::getInstance()->getJobQueueGroupFactory();
53 Assert::parameterType( __CLASS__, $update,
'$update' );
54 '@phan-var self $update';
56 foreach ( $update->jobsByDomain as $domain => $jobs ) {
57 $this->jobsByDomain[$domain] = array_merge(
58 $this->jobsByDomain[$domain] ?? [],
66 foreach ( $this->jobsByDomain as $domain => $jobs ) {
67 $group = $this->jobQueueGroupFactory->makeJobQueueGroup( $domain );
69 $group->push( $jobs );
70 }
catch ( Throwable $e ) {
72 MWExceptionHandler::logException( $e );
Enqueue lazy-pushed jobs that have accumulated from JobQueueGroup.
__construct(string $domain, array $jobs)
doUpdate()
Perform the actual work.
merge(MergeableUpdate $update)
Merge this enqueued update with a new MergeableUpdate of the same qualified class name.
Interface that deferrable updates should implement.
Interface for serializable objects that describe a job queue task.
Interface that deferrable updates can implement to signal that updates can be combined.