Router findCandidateOperators() fix

parent de07170e
...@@ -317,14 +317,15 @@ class Router(ObjectInterruption): ...@@ -317,14 +317,15 @@ class Router(ObjectInterruption):
for candidateOperator in candidateOperators: for candidateOperator in candidateOperators:
# XXX not generic enough - find an other way to initiate skilledRouter and incorporate also setup and load # XXX not generic enough - find an other way to initiate skilledRouter and incorporate also setup and load
if candidateOperator.skillDict: if candidateOperator.skillDict:
if (station.id in candidateOperator.skillDict["process"].get("stationIdList",[]) and station in self.pendingMachines) or\ if ((station.id in candidateOperator.skillDict["process"].get("stationIdList",[]) and station in self.pendingMachines) or\
(station.id in candidateOperator.skillDict["setup"].get("stationIdList",[]) and station in candidateMachines) or\ (station.id in candidateOperator.skillDict["setup"].get("stationIdList",[]) and station in candidateMachines) or\
((station.id in candidateOperator.skillDict["process"].get("stationIdList",[]) and station in candidateMachines) and \ ((station.id in candidateOperator.skillDict["process"].get("stationIdList",[]) and station in candidateMachines) and \
not station.getActiveObjectQueue()): not station.getActiveObjectQueue())) and \
station.checkIfActive():
if not station in candidateOperator.candidateStations: if not station in candidateOperator.candidateStations:
candidateOperator.candidateStations.append(station) candidateOperator.candidateStations.append(station)
else: else:
if not station in candidateOperator.candidateStations: if not station in candidateOperator.candidateStations and station.checkIfActive():
candidateOperator.candidateStations.append(station) candidateOperator.candidateStations.append(station)
if not candidateOperator in self.candidateOperators: if not candidateOperator in self.candidateOperators:
self.candidateOperators.append(candidateOperator) self.candidateOperators.append(candidateOperator)
......
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