30use Wikimedia\Assert\Assert;
40 private $jobsByDomain;
43 private $jobQueueGroupFactory;
50 $this->jobsByDomain[$domain] = $jobs;
58 Assert::parameterType( __CLASS__, $update,
'$update' );
59 '@phan-var self $update';
61 foreach ( $update->jobsByDomain as $domain => $jobs ) {
62 $this->jobsByDomain[$domain] = array_merge(
63 $this->jobsByDomain[$domain] ?? [],
71 foreach ( $this->jobsByDomain as $domain => $jobs ) {
72 $group = $this->jobQueueGroupFactory->makeJobQueueGroup( $domain );
74 $group->push( $jobs );
75 }
catch ( Throwable $e ) {
77 MWExceptionHandler::logException( $e );
84class_alias( JobQueueEnqueueUpdate::class,
'JobQueueEnqueueUpdate' );
Handler class for MWExceptions.
Interface for serializable objects that describe a job queue task.