当前位置: 首页>>代码示例>>PHP>>正文


PHP KalturaLog::stderr方法代码示例

本文整理汇总了PHP中KalturaLog::stderr方法的典型用法代码示例。如果您正苦于以下问题:PHP KalturaLog::stderr方法的具体用法?PHP KalturaLog::stderr怎么用?PHP KalturaLog::stderr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KalturaLog的用法示例。


在下文中一共展示了KalturaLog::stderr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * @param KSchedularTaskConfig $taskConfig
  */
 public function __construct($taskConfig = null)
 {
     /*
      *  argv[0] - the script name
      *  argv[1] - serialized KSchedulerConfig config
      */
     global $argv, $g_context;
     $this->sessionKey = uniqid('sess');
     $this->start = microtime(true);
     if (is_null($taskConfig)) {
         $data = gzuncompress(base64_decode($argv[1]));
         self::$taskConfig = unserialize($data);
     } else {
         self::$taskConfig = $taskConfig;
     }
     if (!self::$taskConfig) {
         die("Task config not supplied");
     }
     date_default_timezone_set(self::$taskConfig->getTimezone());
     // clear seperator between executions
     KalturaLog::debug('___________________________________________________________________________________');
     KalturaLog::stderr('___________________________________________________________________________________', KalturaLog::DEBUG);
     KalturaLog::info(file_get_contents(dirname(__FILE__) . "/../VERSION.txt"));
     if (!self::$taskConfig instanceof KSchedularTaskConfig) {
         KalturaLog::err('config is not a KSchedularTaskConfig');
         die;
     }
     KalturaLog::debug("set_time_limit({" . self::$taskConfig->maximumExecutionTime . "})");
     set_time_limit(self::$taskConfig->maximumExecutionTime);
     KalturaLog::info('Batch index [' . $this->getIndex() . '] session key [' . $this->sessionKey . ']');
     self::$kClientConfig = new KalturaConfiguration();
     self::$kClientConfig->setLogger($this);
     self::$kClientConfig->serviceUrl = self::$taskConfig->getServiceUrl();
     self::$kClientConfig->curlTimeout = self::$taskConfig->getCurlTimeout();
     if (isset(self::$taskConfig->clientConfig)) {
         foreach (self::$taskConfig->clientConfig as $attr => $value) {
             self::$kClientConfig->{$attr} = $value;
         }
     }
     self::$kClient = new KalturaClient(self::$kClientConfig);
     self::$kClient->setPartnerId(self::$taskConfig->getPartnerId());
     self::$clientTag = 'batch: ' . self::$taskConfig->getSchedulerName() . ' ' . get_class($this) . " index: {$this->getIndex()} sessionId: " . UniqueId::get();
     self::$kClient->setClientTag(self::$clientTag);
     //$ks = self::$kClient->session->start($secret, "user-2", KalturaSessionType::ADMIN);
     $ks = $this->createKS();
     self::$kClient->setKs($ks);
     KDwhClient::setEnabled(self::$taskConfig->getDwhEnabled());
     KDwhClient::setFileName(self::$taskConfig->getDwhPath());
     $this->onBatchUp();
     KScheduleHelperManager::saveRunningBatch($this->getName(), $this->getIndex());
 }
开发者ID:DBezemer,项目名称:server,代码行数:54,代码来源:KBatchBase.class.php


注:本文中的KalturaLog::stderr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。