44 parent::__construct(
'enqueue', $title,
$params );
52 $jobs = is_array( $jobs ) ? $jobs : [ $jobs ];
65 foreach ( $jobsByWiki as $wiki => $jobs ) {
66 $jobMapsByWiki[$wiki] = [];
67 foreach ( $jobs as
$job ) {
69 $jobMapsByWiki[$wiki][] =
$job->toSerializableArray();
71 throw new InvalidArgumentException(
"Jobs must be of type JobSpecification." );
73 $deduplicate = $deduplicate &&
$job->ignoreDuplicates();
78 Title::makeTitle(
NS_SPECIAL,
'Badtitle/' . __CLASS__ ),
79 [
'jobsByWiki' => $jobMapsByWiki ]
83 $eJob->removeDuplicates = $deduplicate;
88 public function run() {
89 foreach ( $this->params[
'jobsByWiki'] as $wiki => $jobMaps ) {
91 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( $wiki=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