Commit 957defb9 authored by duanjinfei's avatar duanjinfei

add exec taks result log print

parent acd224fe
......@@ -202,6 +202,7 @@ func (t *TaskHandler) ComputeTaskHandler(taskMsg *nodeManagerV1.PushTaskMessage)
}
endAfterTaskTime := time.Since(startBeforeTaskTime)
log.WithField("time", endAfterTaskTime.Seconds()).WithField("taskId", taskMsg.TaskId).Info("Exec task end (second is units) :")
log.WithField("StatusCode", post.StatusCode).WithField("taskId", taskMsg.TaskId).Info("Exec task result")
if post.StatusCode == http.StatusOK {
headers, err := json.Marshal(post.Header)
if err != nil {
......@@ -217,6 +218,8 @@ func (t *TaskHandler) ComputeTaskHandler(taskMsg *nodeManagerV1.PushTaskMessage)
t.TaskRespBody[taskMsg.TaskId] = readBody
t.TaskIsSuccess[taskMsg.TaskId] = true
t.TaskExecTime[taskMsg.TaskId] = endAfterTaskTime.Microseconds()
} else {
log.WithField("error", post.Body).WithField("taskId", taskMsg.TaskId).Error("Exec task result is failed")
}
if taskMsg.TaskKind == baseV1.TaskKind_ComputeTask {
t.IsExecAiTask = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment