作者 赵彬吉

update

@@ -37,6 +37,7 @@ class SyncSubmitTask extends Command @@ -37,6 +37,7 @@ class SyncSubmitTask extends Command
37 $this->output('任务' . $task_id . '开始'); 37 $this->output('任务' . $task_id . '开始');
38 38
39 $time = time(); 39 $time = time();
  40 +
40 DB::enableQueryLog(); //启用查询日志 41 DB::enableQueryLog(); //启用查询日志
41 42
42 $task_info = SyncSubmitTaskModel::find($task_id); 43 $task_info = SyncSubmitTaskModel::find($task_id);
@@ -77,6 +78,8 @@ class SyncSubmitTask extends Command @@ -77,6 +78,8 @@ class SyncSubmitTask extends Command
77 //数据库查询 78 //数据库查询
78 $this->output('任务用时:' .$use_time . ' | ' . json_encode(DB::getQueryLog(),JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)); 79 $this->output('任务用时:' .$use_time . ' | ' . json_encode(DB::getQueryLog(),JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
79 } 80 }
  81 + //清除之前的查询日志
  82 + DB::flushQueryLog();
80 } 83 }
81 } 84 }
82 85