Skip to content

Commit

Permalink
Merge pull request #93 from cpaxton/fix-parallel-implementation-beetree
Browse files Browse the repository at this point in the history
fix beetree parallel implementation
  • Loading branch information
cpaxton authored Jun 21, 2017
2 parents 7fea8a4 + 0d313d7 commit ebcbdbd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions external/beetree/src/beetree/beetree_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,15 +399,14 @@ def __init__(self,name,label):
L_alt = name.upper()+' Subtree'
color='#22A7F0'
super(NodeParallelAll,self).__init__(name,L,color,alt_label=L_alt)
self.num_success = None
self.num_success = 0
def get_node_type(self):
return 'PARALLEL'
def get_node_name(self):
return 'Parallel'
def execute(self):
# print 'Executing Parallel: (' + self.name_ + ')'
if self.num_success == None:
self.num_success = 0
self.num_success = 0

for C in self.children_:
self.child_status_ = C.execute()
Expand All @@ -424,10 +423,12 @@ def execute(self):

# Only return if all children succeed
if self.num_success == self.num_children_:
self.num_success = None
return self.set_status('SUCCESS')
else:
return self.set_status('RUNNING')
def reset(self):
super(NodeParallelAll, self).reset()
self.num_success = 0

class NodeParallelRemove(Node):
''' Parallel Remove Node
Expand Down

0 comments on commit ebcbdbd

Please sign in to comment.