-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDatabase.php
More file actions
executable file
·74 lines (62 loc) · 2.04 KB
/
Copy pathDatabase.php
File metadata and controls
executable file
·74 lines (62 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
$wgMiserMode = true;
$wgSQLMode = null;
// Technically it's clustering but we only end up using one cluster
if ( class_exists( \Wikimedia\Rdbms\LBFactoryMulti::class ) ) {
// Yoink the connection details from PrivateSettings.php
$primaryServer = $wgDBservers[0] ?? [
'host' => 'db-c1-us-east-021',
'user' => $wgDBuser ?? null,
'password' => $wgDBpassword ?? null,
'type' => 'mysql',
'flags' => DBO_DEFAULT,
];
$wgDBtype = $primaryServer['type'] ?? 'mysql';
$wgDBuser = $primaryServer['user'] ?? null;
$wgDBpassword = $primaryServer['password'] ?? null;
$wgDBserver = $primaryServer['host'];
$wgLBFactoryConf = [
'class' => \Wikimedia\Rdbms\LBFactoryMulti::class,
'secret' => $wgSecretKey,
'sectionsByDB' => $wi->wikiDBClusters,
'sectionLoads' => [
'DEFAULT' => [
'db-c1-us-east-021' => 0,
],
'c1' => [
'db-c1-us-east-021' => 0,
],
],
'serverTemplate' => [
'dbname' => $wgDBname,
'user' => $wgDBuser,
'password' => $wgDBpassword,
'type' => 'mysql',
'flags' => DBO_DEFAULT,
'variables' => [
'innodb_lock_wait_timeout' => 120,
],
],
'hostsByName' => [
'db-c1-us-east-021' => $primaryServer['host'],
'db-pc-us-east-011' => 'db-pc-us-east-011',
],
'externalLoads' => [
'echo' => [
'db-c1-us-east-021' => 0,
],
'pc1' => [
'db-pc-us-east-011' => 0,
],
],
'templateOverridesByCluster' => [
'pc1' => [
'dbname' => 'parsercache',
],
],
'readOnlyBySection' => [
//'DEFAULT' => 'Maintenance is in progress. Please try again in a few minutes.',
//'c1' => 'Maintenance is in progress. Please try again in a few minutes.',
],
];
}