Updated dependency detection.

This commit is contained in:
Simon Wüllhorst 2016-05-29 20:33:40 +02:00
parent db0800c5c7
commit a1e26d32d3

View file

@ -58,8 +58,20 @@ class LocalGraph(Graph):
return nodes return nodes
def getNodesWithNoDependencies(self): def getNodesWithNoDependencies(self):
#TODO: Implement smarter selection nodesWithNoDependencies = []
return self.getAllNodesWithDepthEquals(self.getMaxDepth()) for k,v in self.__nodes__.items():
depth = self.getDeptOfNode(v)
hasDependencies = False
for link in self.getLinksByNodeID(k):
for node in link.getEndpointNodes():
if depth < self.getDeptOfNode(node):
hasDependencies = True
break
if hasDependencies == True:
break
else:
nodesWithNoDependencies.append(v)
return nodesWithNoDependencies
def isAutoupdaterEnabledOnAllNodes(self): def isAutoupdaterEnabledOnAllNodes(self):
for k, v in self.__nodes__.items(): for k, v in self.__nodes__.items():