Commit e43dbb24 authored by Your Name's avatar Your Name

fix exec duration and http response body

parent b6823572
......@@ -235,7 +235,8 @@ func batchToQuestDb(done chan interface{}, reqStream chan pbUpstream.TaskContent
Int64Column("workload", int64(task.TaskWorkload)).
Int64Column("out_len", int64(task.TaskOutLen)).
Int64Column("task_duration", int64(task.TaskDuration)).
Int64Column("exec_duration", int64(0)).
//task_execute_duration
Int64Column("exec_duration", int64(task.TaskExecuteDuration)).
AtNow(ctx)
err = sender.Flush(ctx)
......@@ -609,16 +610,18 @@ func ApiAndJWT(c *fiber.Ctx) error {
}
}
resAsJson := ResponseJson{
TaskUUID: resAsPb.TaskUuid,
TaskResult: resAsPb.GetTaskResultBody(),
TaskUid: resAsPb.TaskUid,
TaskFee: resAsPb.TaskFee,
IsSuccess: resAsPb.TaskIsSucceed,
TaskError: resAsPb.TaskError,
}
// resAsJson := ResponseJson{
// TaskUUID: resAsPb.TaskUuid,
// TaskResult: resAsPb.GetTaskResultBody(),
// TaskUid: resAsPb.TaskUid,
// TaskFee: resAsPb.TaskFee,
// IsSuccess: resAsPb.TaskIsSucceed,
// TaskError: resAsPb.TaskError,
// }
return c.Send(resAsPb.GetTaskResultBody())
return c.JSON(resAsJson)
//return c.JSON(resAsJson)
}
......
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