Commit 914849a5 authored by duanjinfei's avatar duanjinfei

update task result error

parent 40d0862a
...@@ -287,15 +287,15 @@ func handlerMsg(nodeManager *models.NodeManagerClient, ...@@ -287,15 +287,15 @@ func handlerMsg(nodeManager *models.NodeManagerClient,
taskMsgWorker.Wg.Wait() taskMsgWorker.Wg.Wait()
taskExecResInterface, _ := taskMsgWorker.LruCache.Get(taskMsg.TaskId) taskExecResInterface, _ := taskMsgWorker.LruCache.Get(taskMsg.TaskId)
//log.WithField("result", taskExecResInterface).Info("lru cache get task result") //log.WithField("result", taskExecResInterface).Info("lru cache get task result")
taskExecRes := taskExecResInterface.(*models.TaskResult) taskExecRes := &models.TaskResult{
if taskExecResInterface == nil { TaskHttpStatusCode: 200,
taskExecRes = &models.TaskResult{ TaskRespBody: nil,
TaskHttpStatusCode: 200, TaskHttpHeaders: nil,
TaskRespBody: nil, TaskIsSuccess: false,
TaskHttpHeaders: nil, TaskExecTime: 0,
TaskIsSuccess: false, }
TaskExecTime: 0, if taskExecResInterface != nil {
} taskExecRes = taskExecResInterface.(*models.TaskResult)
} }
isSuccess := taskExecRes.TaskIsSuccess isSuccess := taskExecRes.TaskIsSuccess
containerSign := taskMsgWorker.DockerOp.GetContainerSign(taskMsg, taskExecRes.TaskRespBody) containerSign := taskMsgWorker.DockerOp.GetContainerSign(taskMsg, taskExecRes.TaskRespBody)
......
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