Commit 279093bb authored by vicotor's avatar vicotor

implement new produccer

parent 86a56249
......@@ -3,6 +3,7 @@ package main
import (
"github.com/IBM/sarama"
"github.com/gogo/protobuf/proto"
"github.com/google/uuid"
odysseus "github.com/odysseus/odysseus-protocol/gen/proto/go/base/v1"
"github.com/odysseus/scheduler/config"
log "github.com/sirupsen/logrus"
......@@ -76,15 +77,18 @@ func produceTask() {
func makeTask() *odysseus.TaskContent {
task := &odysseus.TaskContent{
TaskId: "1111111",
TaskType: 1,
TaskKind: odysseus.TaskKind_ComputeTask,
TaskCmd: "",
TaskParam: []byte("give me five"),
TaskTimestamp: uint64(time.Now().Unix()),
TaskCallback: "http://localhost:8080/callback",
TaskUid: "1",
TaskFee: "10",
TaskId: uuid.NewString(),
TaskType: 1,
TaskKind: odysseus.TaskKind_ComputeTask,
TaskCmd: "",
TaskParam: []byte("give me five"),
TaskTimestamp: uint64(time.Now().UnixNano() / 1000),
TaskCallback: "http://localhost:8080/callback",
TaskUid: "1",
TaskFee: "10",
TaskInLen: 10,
TaskWorkload: 100,
ContainerPubkey: []byte{},
}
return task
}
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