Commit 1b3fb251 authored by Your Name's avatar Your Name

add workload public to kafka

parent b3cbf474
......@@ -548,16 +548,18 @@ func ApiAndJWT(c *fiber.Ctx) error {
cmd = task.Cmd
pbMsg := pbUpstream.TaskContent{
TaskUuid: reqHeaders["Task-Id"][0],
TaskId: uint64(task.ID),
TaskType: 1,
TaskCmd: cmd,
TaskParam: c.Body(), //[]byte(reqHeaders["Task-Id"][0]),
TaskTimestamp: uint64(time.Now().UnixNano()),
TaskCallback: "http://" + callbackAddr + "/callback/v1", //"http://192.168.1.10:6001/callback/v1",
TaskUid: reqHeaders["X-Consumer-Custom-Id"][0],
TaskFee: fmt.Sprintf("%d", task.Price),
TaskInLen: int32(len(c.Body())),
TaskUuid: reqHeaders["Task-Id"][0],
TaskId: uint64(task.ID),
TaskType: 1,
TaskCmd: cmd,
TaskParam: c.Body(), //[]byte(reqHeaders["Task-Id"][0]),
TaskTimestamp: uint64(time.Now().UnixNano()),
TaskCallback: "http://" + callbackAddr + "/callback/v1", //"http://192.168.1.10:6001/callback/v1",
TaskUid: reqHeaders["X-Consumer-Custom-Id"][0],
TaskFee: fmt.Sprintf("%d", task.Price),
TaskInLen: int32(len(c.Body())),
TaskWorkload: task.Workload,
ContainerPubkey: []byte(task.PublicKey),
}
msgAsJson, err := json.Marshal(pbMsg)
......
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