Example #1
0
 public function onFinish($serv, $task_id, $data)
 {
     Logger::logInfo("tasking_num: [" . $serv->stats()['tasking_num'] . "] pid: [" . posix_getpid() . "] task_id: [" . $task_id . "] message: [" . $data . "]");
 }
 /**
  * 数据库调试 记录当前SQL
  * @access protected
  * @param boolean $start  调试开始标记 true 开始 false 结束
  */
 protected function debug($start)
 {
     if ($this->config['debug']) {
         // 开启数据库调试模式
         if ($start) {
             G('queryStartTime');
         } else {
             $this->modelSql[$this->model] = $this->queryStr;
             //$this->model  =   '_think_';
             // 记录操作结束时间
             G('queryEndTime');
             \lib\log\Logger::logInfo($this->queryStr . ' [ RunTime:' . G('queryStartTime', 'queryEndTime') . 's ]', '', 'SQL');
         }
     }
 }