Commit 914849a5 authored by duanjinfei's avatar duanjinfei

update task result error

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