43 parent::__construct(
'enqueue', $title,
$params );
51 $jobs = is_array( $jobs ) ? $jobs : [ $jobs ];
64 foreach ( $jobsByWiki as $wiki => $jobs ) {
65 $jobMapsByWiki[$wiki] = [];
66 foreach ( $jobs as
$job ) {
68 $jobMapsByWiki[$wiki][] =
$job->toSerializableArray();
70 throw new InvalidArgumentException(
"Jobs must be of type JobSpecification." );
72 $deduplicate = $deduplicate &&
$job->ignoreDuplicates();
77 Title::makeTitle(
NS_SPECIAL,
'Badtitle/' . __CLASS__ ),
78 [
'jobsByWiki' => $jobMapsByWiki ]
82 $eJob->removeDuplicates = $deduplicate;
87 public function run() {
88 foreach ( $this->params[
'jobsByWiki'] as $wiki => $jobMaps ) {
90 foreach ( $jobMaps as $jobMap ) {
wfWikiID()
Get an ASCII string identifying this wiki This is used as a prefix in memcached keys.
Router job that takes jobs and enqueues them to their proper queues.
static newFromJobsByWiki(array $jobsByWiki)
__construct(Title $title, array $params)
Callers should use the factory methods instead.
static newFromLocalJobs( $jobs)
static singleton( $domain=false)
Job queue task description base code.
static newFromArray(array $map)
Class to both describe a background job and handle jobs.
array $params
Array of job parameters.
Represents a title within MediaWiki.
if(count( $args)< 1) $job