Commit 3e86446d authored by duanjinfei's avatar duanjinfei

updage model container start

parent 77138ecb
......@@ -135,9 +135,11 @@ func monitorWorker(op *operate.DockerOp) {
// 证明存储
go proofWorker.ProofStorage()
log.Info("Proof storage worker started")
// 证明提交
go proofWorker.CommitWitness()
log.Info("Proof commit worker started")
// 处理消息
for i := 0; i < 5; i++ {
......
......@@ -153,10 +153,10 @@ func (t *TaskHandler) ComputeTaskHandler(taskMsg *nodeManagerV1.PushTaskMessage)
}
taskCmd.DockerCmd.HostPort = strconv.FormatInt(externalPort, 10)
taskCmd.ApiUrl = fmt.Sprintf(taskCmd.ApiUrl, externalPort)
if int64(len(containers)) == conf.GetConfig().ContainerNum {
//todo: 待定,需要根据权重去停止哪个容器
t.DockerOp.StopAndDeleteContainer(containers[0].ID)
}
//if int64(len(containers)) == conf.GetConfig().ContainerNum {
// //todo: 待定,需要根据权重去停止哪个容器
// t.DockerOp.StopAndDeleteContainer(containers[0].ID)
//}
containerId, err := t.DockerOp.CreateAndStartContainer(taskCmd.ImageName, taskCmd.DockerCmd)
if err != nil {
log.Errorf("Create and start container failed: %s", err.Error())
......
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