File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -874,7 +874,10 @@ def tick(self) -> typing.Iterator[behaviour.Behaviour]:
874874 yield node
875875 if node is self .main :
876876 if node .status in (common .Status .SUCCESS , common .Status .RUNNING ):
877- self .status = node .status
877+ if node .status == common .Status .SUCCESS :
878+ self .stop (node .status )
879+ else :
880+ self .status = node .status
878881 yield self
879882 return
880883 elif node .status == common .Status .FAILURE :
@@ -907,7 +910,7 @@ def tick(self) -> typing.Iterator[behaviour.Behaviour]:
907910 yield self
908911
909912 # No recoveries left → fail
910- self .status = common .Status .FAILURE
913+ self .stop ( common .Status .FAILURE )
911914 yield self
912915
913916 def stop (self , new_status : common .Status = common .Status .INVALID ) -> None :
@@ -917,8 +920,11 @@ def stop(self, new_status: common.Status = common.Status.INVALID) -> None:
917920 Args:
918921 new_status : the composite is transitioning to this new status
919922 """
920- for child in self .children :
923+ self .logger .debug (
924+ f"{ self .__class__ .__name__ } .stop()[{ self .status } ->{ new_status } ]"
925+ )
926+ for child in self .children [1 :]:
921927 if child .status != common .Status .INVALID :
922928 child .stop (common .Status .INVALID )
923929 self .current_recovery_index = 0
924- super () .stop (new_status )
930+ Composite .stop (self , new_status )
You can’t perform that action at this time.
0 commit comments