23use Wikimedia\Assert\Assert;
40 $this->jobsByDomain[$domain] = $jobs;
45 Assert::parameterType( __CLASS__, $update,
'$update' );
46 '@phan-var self $update';
48 foreach ( $update->jobsByDomain as $domain => $jobs ) {
49 $this->jobsByDomain[$domain] = $this->jobsByDomain[$domain] ?? [];
50 $this->jobsByDomain[$domain] = array_merge( $this->jobsByDomain[$domain], $jobs );
55 foreach ( $this->jobsByDomain as $domain => $jobs ) {
56 $group = JobQueueGroup::singleton( $domain );
58 $group->push( $jobs );
59 }
catch ( Exception $e ) {
61 MWExceptionHandler::logException( $e );
Enqueue lazy-pushed jobs that have accumulated from JobQueueGroup.
array[] $jobsByDomain
Map of (domain ID => IJobSpecification[])
doUpdate()
Perform the actual work.
merge(MergeableUpdate $update)
Merge this update with $update.
__construct( $domain, array $jobs)
Interface that deferrable updates should implement.
Interface that deferrable updates can implement to signal that updates can be combined.