Commit dfd4fd4f authored by duanjinfei's avatar duanjinfei

add body

parent 29411286
......@@ -129,13 +129,17 @@ func (t *TaskWorker) ComputeTaskHandler(taskMsg *nodemanagerV2.PushTaskMessage)
t.lastExecTaskStartTime = time.Now()
t.checkLastTaskExecStatus(taskMsg)
log.Info("check last task exec status successful")
bodyByte := utils.EncodeJsonEscapeHTML([]string{"https://replicate.delivery/pbxt/KW7CdCusXMkkOs9bbCGYsInC8EUxlj3yBLxvfW9Fs9FFMZUL/MTk4MTczMTkzNzI1Mjg5NjYy.webp"})
header := make(map[string][]string, 0)
header["Content-Type"] = []string{"application/json"}
headerByte, _ := json.Marshal(header)
taskOp := &TaskOp{
taskMsg: taskMsg,
taskCmd: &models.TaskCmd{},
taskExecResult: &models.TaskResult{
TaskHttpStatusCode: 200,
TaskRespBody: []byte{1, 2, 3, 4, 5},
TaskHttpHeaders: []byte{1, 2, 3, 5, 6},
TaskRespBody: bodyByte,
TaskHttpHeaders: headerByte,
TaskIsSuccess: true,
TaskExecTime: 0,
TaskExecError: "",
......
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