Commit fa90d6b2 authored by duanjinfei's avatar duanjinfei

update send msg time

parent 8ca243e7
...@@ -164,6 +164,7 @@ func monitorWorker(op *operate.DockerOp) { ...@@ -164,6 +164,7 @@ func monitorWorker(op *operate.DockerOp) {
} }
ticker = time.NewTicker(time.Second * 20) ticker = time.NewTicker(time.Second * 20)
msgRespWorker.RegisterMsgResp(nodeManager, worker, RegisterInfoResp, nil) msgRespWorker.RegisterMsgResp(nodeManager, worker, RegisterInfoResp, nil)
time.Sleep(time.Second * 2)
msgRespWorker.RegisterMsgResp(nodeManager, worker, DeviceInfoResp, nil) msgRespWorker.RegisterMsgResp(nodeManager, worker, DeviceInfoResp, nil)
isSend = true isSend = true
log.Info("------------------------Send once-off message ended------------------------") log.Info("------------------------Send once-off message ended------------------------")
...@@ -176,12 +177,12 @@ func monitorWorker(op *operate.DockerOp) { ...@@ -176,12 +177,12 @@ func monitorWorker(op *operate.DockerOp) {
log.Info("Report model info started") log.Info("Report model info started")
// 证明存储 // 证明存储
go proofWorker.ProofStorage() //go proofWorker.ProofStorage()
log.Info("Proof storage worker started") //log.Info("Proof storage worker started")
// 证明提交 // 证明提交
go proofWorker.CommitWitness() //go proofWorker.CommitWitness()
log.Info("Proof commit worker started") //log.Info("Proof commit worker started")
go handlerStandardTask(nodeManager, worker, msgRespWorker, taskMsgWorker) go handlerStandardTask(nodeManager, worker, msgRespWorker, taskMsgWorker)
log.Info("Handler standard task worker started") log.Info("Handler standard task worker started")
...@@ -307,25 +308,25 @@ func handlerMsg(nodeManager *models.NodeManagerClient, ...@@ -307,25 +308,25 @@ func handlerMsg(nodeManager *models.NodeManagerClient,
nmResultMsg := rev.GetProofTaskResult() nmResultMsg := rev.GetProofTaskResult()
if nmResultMsg != nil { if nmResultMsg != nil {
containerSign, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.ContainerSign) //containerSign, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.ContainerSign)
//if !ok { //if !ok {
// log.Error("taskMsgWorker.LruCache.Get failed: ", nmSignMsg.TaskUuid+models.ContainerSign) // log.Error("taskMsgWorker.LruCache.Get failed: ", nmSignMsg.TaskUuid+models.ContainerSign)
//} //}
minerSign, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.MinerSign) //minerSign, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.MinerSign)
//if !ok { //if !ok {
// log.Error("taskMsgWorker.LruCache.Get failed: ", nmSignMsg.TaskUuid+models.MinerSign) // log.Error("taskMsgWorker.LruCache.Get failed: ", nmSignMsg.TaskUuid+models.MinerSign)
//} //}
reqHash, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.ReqHash) //reqHash, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.ReqHash)
//if !ok { //if !ok {
// log.Error("taskMsgWorker.LruCache.Get failed: ", nmSignMsg.TaskUuid+models.ReqHash) // log.Error("taskMsgWorker.LruCache.Get failed: ", nmSignMsg.TaskUuid+models.ReqHash)
//} //}
respHash, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.RespHash) //respHash, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.RespHash)
//if !ok { //if !ok {
// log.Error("taskMsgWorker.LruCache.Get failed: ", nmSignMsg.TaskUuid+models.RespHash) // log.Error("taskMsgWorker.LruCache.Get failed: ", nmSignMsg.TaskUuid+models.RespHash)
//} //}
taskType, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.TaskType) //taskType, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.TaskType)
proofWorker.ProductProof(nmResultMsg, taskType.(uint64), reqHash.([]byte), respHash.([]byte), containerSign.([]byte), minerSign.([]byte)) //proofWorker.ProductProof(nmResultMsg, taskType.(uint64), reqHash.([]byte), respHash.([]byte), containerSign.([]byte), minerSign.([]byte))
log.Info(nmResultMsg) log.WithField("proof", nmResultMsg).Info("Output proof task result")
continue continue
} }
......
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