42 parent::__construct(
'enqueue',
$params );
50 $jobs = is_array( $jobs ) ? $jobs : [ $jobs ];
64 $jobMapsByDomain = [];
65 foreach ( $jobsByDomain as $domain => $jobs ) {
66 $jobMapsByDomain[$domain] = [];
67 foreach ( $jobs as
$job ) {
69 $jobMapsByDomain[$domain][] =
$job->toSerializableArray();
71 throw new InvalidArgumentException(
"Jobs must be of type JobSpecification." );
73 $deduplicate = $deduplicate &&
$job->ignoreDuplicates();
77 $eJob =
new self( [
'jobsByDomain' => $jobMapsByDomain ] );
80 $eJob->removeDuplicates = $deduplicate;
94 public function run() {
95 $jobsByDomain = $this->params[
'jobsByDomain'] ?? $this->params[
'jobsByWiki'];
97 foreach ( $jobsByDomain as $domain => $jobMaps ) {
99 foreach ( $jobMaps as $jobMap ) {