elif operation == "isAppRunning":
result = self._is_app_running(uuid)
+ elif operation == "isAppStarted":
+ result = self._is_app_started(uuid)
+
elif operation == "recvFD":
### passFD operation binds to a different random socket
### en every execution, so the socket name that could be
app.GetAttribute("StartTime", start_time_value)
start_time = start_time_value.Get()
- if now.Compare(start_time) >= 0 and now.Compare(stop_time) < 0:
- return True
+ if now.Compare(start_time) >= 0:
+ if stop_time.IsZero() or now.Compare(stop_time) < 0:
+ return True
return False
+
+ def _is_app_started(self, uuid):
+ return self._is_app_running(uuid) or self.is_finished()
def _add_static_route(self, ipv4_uuid, network, prefix, nexthop):
ipv4 = self.get_object(ipv4_uuid)