Commit 7d04b9f9 authored by duanjinfei's avatar duanjinfei

add log pring

parent 9f43372d
......@@ -327,6 +327,7 @@ func handlerMsg(nodeManager *models.NodeManagerClient,
taskMsgWorker.Wg.Wait()
taskResHeader := taskMsgWorker.TaskRespHeader[taskMsg.TaskUuid]
taskResBody := taskMsgWorker.TaskRespBody[taskMsg.TaskUuid]
log.Info("taskResBody:", taskResBody)
isSuccess := taskMsgWorker.TaskIsSuccess[taskMsg.TaskUuid]
containerSign := taskMsgWorker.DockerOp.GetContainerSign(taskMsg, taskResBody)
if containerSign == nil || len(containerSign) == 0 {
......
......@@ -86,6 +86,7 @@ func (t *TaskHandler) ComputeTaskHandler(taskMsg *nodeManagerV1.PushTaskMessage)
t.TaskRespBody[taskMsg.TaskUuid] = nil
t.TaskRespHeader[taskMsg.TaskUuid] = nil
t.TaskIsSuccess[taskMsg.TaskUuid] = false
log.Info("taskMsg task param:", taskMsg.TaskParam)
reader := bytes.NewReader(taskMsg.TaskParam)
taskCmd := &models.TaskCmd{}
err := json.Unmarshal(bytes.NewBufferString(taskMsg.TaskCmd).Bytes(), taskCmd)
......@@ -157,7 +158,9 @@ func (t *TaskHandler) ComputeTaskHandler(taskMsg *nodeManagerV1.PushTaskMessage)
log.Error("Http client post error: ", err)
return
}
log.Info("Post container before StatusCode:", post.StatusCode)
if post.StatusCode == http.StatusOK {
log.Info("Post container after StatusCode:", post.StatusCode)
headers, err := json.Marshal(post.Header)
if err != nil {
log.Error("JSON marshal header error: ", err)
......
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