*
* masterTemplateOverrides An override array for all master servers.
*
+ * loadMonitorClass Name of the LoadMonitor class to always use.
+ *
* readOnlyBySection A map of section name to read-only message.
* Missing or false for read/write.
*
/** @var LoadBalancer[] */
private $extLBs = array();
+ /** @var string */
+ private $loadMonitorClass;
+
/** @var string */
private $lastWiki;
$optional = array( 'groupLoadsBySection', 'groupLoadsByDB', 'hostsByName',
'externalLoads', 'externalTemplateOverrides', 'templateOverridesByServer',
'templateOverridesByCluster', 'masterTemplateOverrides',
- 'readOnlyBySection' );
+ 'readOnlyBySection', 'loadMonitorClass' );
foreach ( $required as $key ) {
if ( !isset( $conf[$key] ) ) {
$this->$key = $conf[$key];
}
}
-
- // Check for read-only mode
- $section = $this->getSectionForWiki();
- if ( !empty( $this->readOnlyBySection[$section] ) ) {
- global $wgReadOnly;
- $wgReadOnly = $this->readOnlyBySection[$section];
- }
}
/**
$servers = $this->makeServerArray( $template, $loads, $groupLoads );
$lb = new LoadBalancer( array(
'servers' => $servers,
+ 'loadMonitor' => $this->loadMonitorClass
) );
return $lb;
$serverInfo = $this->masterTemplateOverrides + $serverInfo;
}
$master = false;
+ } else {
+ $serverInfo['slave'] = true;
}
if ( isset( $this->templateOverridesByServer[$serverName] ) ) {
$serverInfo = $this->templateOverridesByServer[$serverName] + $serverInfo;