Commit 4c57934f authored by vicotor's avatar vicotor

close resource check

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