Exemple #1
0
 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();
     }
 }
Exemple #2
0
 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));
 }
Exemple #3
0
Fichier : Web.php Projet : hihus/pi
 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();
 }
Exemple #4
0
 public function run()
 {
     parent::run();
 }