57 private $readOnlyMode;
60 private $statsdDataFactory;
66 private $globalIdGenerator;
83 $this->instances = [];
84 $this->options = $options;
85 $this->readOnlyMode = $readOnlyMode;
86 $this->statsdDataFactory = $statsdDataFactory;
87 $this->wanCache = $wanCache;
88 $this->globalIdGenerator = $globalIdGenerator;
98 if ( $domain === false ) {
99 $domain = WikiMap::getCurrentWikiDbDomain()->getId();
104 $isCurrentWiki = WikiMap::isCurrentWikiDbDomain( $domain );
105 if ( !$isCurrentWiki ) {
106 $wikiId = WikiMap::getWikiIdFromDbDomain( $domain );
109 throw new LogicException(
"Domain '{$domain}' is not recognized." );
113 if ( !isset( $this->instances[$domain] ) ) {
114 $localJobClasses = $isCurrentWiki
124 $this->statsdDataFactory,
126 $this->globalIdGenerator
130 return $this->instances[$domain];
if(!defined('MW_SETUP_CALLBACK'))
Handle enqueueing of background jobs.
A class containing constants representing the names of configuration variables.
const JobTypeConf
Name constant for the JobTypeConf setting, for use with Config::get()
const LocalDatabases
Name constant for the LocalDatabases setting, for use with Config::get()
const JobClasses
Name constant for the JobClasses setting, for use with Config::get()
const JobTypesExcludedFromDefaultQueue
Name constant for the JobTypesExcludedFromDefaultQueue setting, for use with Config::get()