Commit 4c57934f authored by vicotor's avatar vicotor

close resource check

parent 8f1d135d
...@@ -393,13 +393,15 @@ func (n *Node) PopWorker(ctx context.Context, rdb *redis.Client, task *odysseus. ...@@ -393,13 +393,15 @@ func (n *Node) PopWorker(ctx context.Context, rdb *redis.Client, task *odysseus.
priority: i, priority: i,
managers: managerList, managers: managerList,
} }
if !checkWorkerHasResource(rdb, worker.addr, task.TaskType) { if false {
n.addWorkerBack(worker) if !checkWorkerHasResource(rdb, worker.addr, task.TaskType) {
if checked := checkedWorker[worker.workerid]; checked { n.addWorkerBack(worker)
break if checked := checkedWorker[worker.workerid]; checked {
} else { break
checkedWorker[worker.workerid] = true } else {
continue checkedWorker[worker.workerid] = true
continue
}
} }
} }
return worker, nil return worker, nil
......
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