public function load() { $this->configTimestamp = $this->calculateFileTimestamp(); $configFileName = $this->configFileName; KalturaLog::log("loading configuration {$configFileName} at " . $this->configTimestamp); if (is_dir($this->configFileName)) { $configFileName = kEnvironment::get('cache_root_path') . DIRECTORY_SEPARATOR . 'batch' . DIRECTORY_SEPARATOR . 'config.ini'; $this->implodeDirectoryFiles($configFileName); } $hostname = self::getHostname(); parent::__construct($configFileName, $hostname, true); $this->name = $hostname; $this->hostName = $hostname; $this->taskConfigList = array(); foreach ($this->enabledWorkers as $workerName => $maxInstances) { if (!$maxInstances) { continue; } $task = new KSchedularTaskConfig($configFileName, $workerName, $maxInstances); $task->setPartnerId($this->getPartnerId()); $task->setSecret($this->getSecret()); $task->setCurlTimeout($this->getCurlTimeout()); $task->setSchedulerId($this->getId()); $task->setSchedulerName($this->getName()); $task->setServiceUrl($this->getServiceUrl()); $task->setDwhPath($this->getDwhPath()); $task->setDirectoryChmod($this->getDirectoryChmod()); $task->setChmod($this->getChmod()); $task->setDwhEnabled($this->getDwhEnabled()); $task->setTimezone($this->getTimezone()); $task->setInitOnly(false); $task->setRemoteServerUrl($this->getRemoteServerUrl()); $task->setMaxIdleTime($this->getMaxIdleTime()); $this->taskConfigList[$workerName] = $task; } }