コード例 #1
0
    def execute(self, *args, **kwargs):
        if PriorityContainer.active_container != self._get_path():
            self._parent_active_container = PriorityContainer.active_container
            PriorityContainer.active_container = self._get_path()

        outcome = OperatableStateMachine.execute(self, *args, **kwargs)

        if outcome != self._loopback_name:
            PriorityContainer.active_container = self._parent_active_container

        return outcome
コード例 #2
0
    def execute(self, *args, **kwargs):
        if PriorityContainer.active_container != self._get_path():
            self._parent_active_container = PriorityContainer.active_container
            PriorityContainer.active_container = self._get_path()

        outcome = OperatableStateMachine.execute(self, *args, **kwargs)

        if outcome != self._loopback_name:
            PriorityContainer.active_container = self._parent_active_container

        return outcome
コード例 #3
0
    def execute(self, *args, **kwargs):
        if (PriorityContainer.active_container is None or
                not all(p == PriorityContainer.active_container.split('/')[i]
                        for i, p in enumerate(self._get_path().split('/')))):
            self._parent_active_container = PriorityContainer.active_container
            PriorityContainer.active_container = self._get_path()

        outcome = OperatableStateMachine.execute(self, *args, **kwargs)

        if outcome != self._loopback_name:
            PriorityContainer.active_container = self._parent_active_container

        return outcome
コード例 #4
0
 def _build_msg(self, *args, **kwargs):
     # use state machine _build_msg, not state execute
     return OperatableStateMachine._build_msg(self, *args, **kwargs)
コード例 #5
0
 def _concurrency_execute(self, *args, **kwargs):
     # use state machine execute, not state execute
     return OperatableStateMachine.execute(self, *args, **kwargs)