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.
priority: i,
managers: managerList,
}
if !checkWorkerHasResource(rdb, worker.addr, task.TaskType) {
n.addWorkerBack(worker)
if checked := checkedWorker[worker.workerid]; checked {
break
} else {
checkedWorker[worker.workerid] = true
continue
if false {
if !checkWorkerHasResource(rdb, worker.addr, task.TaskType) {
n.addWorkerBack(worker)
if checked := checkedWorker[worker.workerid]; checked {
break
} else {
checkedWorker[worker.workerid] = true
continue
}
}
}
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