public function run() { //内网api调用 if ($this->_checkInnerApi()) { //如果有其他调试输出忽略 ob_start(); define("USE_INNER_API", 1); Pi::inc(PI_CORE . 'Proxy.php'); PiProxyServer::Server(); } else { //初始化pipe $default_pipe = array('ApiReqPipe' => 'default', 'ApiHttpRouterPipe' => 'default'); $pipes = Pi::get('global.pipes', array()); if (empty($pipes)) { $pipes = $default_pipe; } $this->pipeLoadContainer = $pipes; parent::run(); } }
public function run() { //初始化pipe $default_pipe = array('TaskProcessPipe' => 'default'); $pipes = Conf::get('global.pipes', array()); if (empty($pipes)) { $pipes = $default_pipe; } $this->pipeLoadContainer = $pipes; //后台脚本方便日志记录,把所有输出全部定位到日志目录 ob_start(); echo "\n---------------------" . date("Y-m-d H:i:s") . "--------------------\n"; echo "\nrun result:\n"; $this->timer->begin('task_run'); parent::run(); $this->timer->end('task_run'); $time = $this->timer->getResult(); echo "\nrun time : " . $time[0]['1'] / 1000 . " s \n"; echo "\n---------------------" . date("Y-m-d H:i:s") . "--------------------\n"; $res = ob_get_clean(); Logger::trace("%s", var_export($res, true)); }
public function run() { //初始化pipe $default_pipe = array('WebReqPipe' => 'default', 'WebRouterPipe' => 'default'); $pipes = Pi::get('global.pipes', array()); if (empty($pipes)) { $pipes = $default_pipe; } $this->pipeLoadContainer = $pipes; parent::run(); }
public function run() { parent::run(); }