-
Notifications
You must be signed in to change notification settings - Fork 2
/
bootstrap.php
40 lines (31 loc) · 1.23 KB
/
bootstrap.php
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
<?php
if ( defined( 'MWSTAKE_MEDIAWIKI_COMPONENT_RUNJOBSTRIGGER_VERSION' ) ) {
return;
}
define( 'MWSTAKE_MEDIAWIKI_COMPONENT_RUNJOBSTRIGGER_VERSION', '2.0.3' );
MWStake\MediaWiki\ComponentLoader\Bootstrapper::getInstance()
->register( 'runjobstrigger', static function () {
$GLOBALS['mwsgRunJobsTriggerOptions'] = [
"*" => [
"basetime" => [ 1, 0, 0 ],
"once-a-week-day" => "sunday"
]
];
$GLOBALS['mwsgRunJobsTriggerHandlerRegistry'] = [];
$GLOBALS['mwsgRunJobsTriggerHandlerFactories'] = [
'globalvars-config' => [
'class' => "\\MWStake\\MediaWiki\\Component\\RunJobsTrigger\\HandlerFactory\\GlobalVars"
],
'hook' => [
'class' => "\\MWStake\\MediaWiki\\Component\\RunJobsTrigger\\HandlerFactory\\Hook",
'services' => [ 'MainConfig' ]
]
];
$GLOBALS['mwsgRunJobsTriggerRunnerWorkingDir'] = sys_get_temp_dir();
$GLOBALS['wgJobClasses']['invokeRunner']
= "\\MWStake\\MediaWiki\\Component\\RunJobsTrigger\\Job\\InvokeRunner";
$GLOBALS['wgExtensionFunctions'][]
= "\\MWStake\\MediaWiki\\Component\\RunJobsTrigger\\Runner::runDeferred";
$GLOBALS['wgHooks']['LoadExtensionSchemaUpdates'][] = "\\MWStake\\MediaWiki\\Component\\"
. "RunJobsTrigger\\Hook\\LoadExtensionSchemaUpdates\\ClearJSONFiles::callback";
} );