forked from kaltura/server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap_scheduler.php
43 lines (35 loc) · 1.31 KB
/
bootstrap_scheduler.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
41
42
<?php
/**
*
* @package Scheduler
*/
chdir(__DIR__);
define('KALTURA_ROOT_PATH', realpath(__DIR__ . '/../'));
require_once(KALTURA_ROOT_PATH . '/alpha/config/kConf.php');
define("KALTURA_BATCH_PATH", KALTURA_ROOT_PATH . "/batch");
// Autoloader - override the autoloader defaults
require_once(KALTURA_ROOT_PATH . "/infra/KAutoloader.php");
KAutoloader::setClassPath(array(
KAutoloader::buildPath(KALTURA_ROOT_PATH, "infra", "*"),
KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "*"),
KAutoloader::buildPath(KALTURA_ROOT_PATH, "plugins", "*"),
KAutoloader::buildPath(KALTURA_BATCH_PATH, "*"),
));
require_once(KALTURA_BATCH_PATH . '/client/KalturaClient.php');
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "plugins", "*", "batch", "*"));
KAutoloader::setIncludePath(array(
KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "ZendFramework", "library"),
));
KAutoloader::setClassMapFilePath(kEnvironment::get("cache_root_path") . '/batch/classMap.cache');
KAutoloader::register();
// Logger
$loggerConfigPath = KALTURA_ROOT_PATH . "/configurations/logger.ini";
try // we don't want to fail when logger is not configured right
{
$config = new Zend_Config_Ini($loggerConfigPath);
KalturaLog::initLog($config->batch_scheduler);
KalturaLog::setContext("BATCH");
}
catch(Zend_Config_Exception $ex)
{
}