parameters: (self)
docstring: Get the current execution status of the engine.
docstring_summary: Get the current execution status of the engine.
docstring_tokens: Get the current execution status of the engine .
function: def get_status(self) -> EngineStatus:
          """Get the current execution status of the engine."""
          if self._state.run_result:
              if not self._state.is_hardware_stopped:
                  return (
                      EngineStatus.STOP_REQUESTED
                      if self._state.run_result == RunResult.STOPPED
                      else EngineStatus.FINISHING
                  )
              elif self._state.run_result == RunResult.FAILED:
                  return EngineStatus.FAILED
              elif self._state.run_result == RunResult.SUCCEEDED:
                  return EngineStatus.SUCCEEDED
              else:
                  return EngineStatus.STOPPED
  
          elif self._state.queue_status == QueueStatus.ACTIVE:
              return EngineStatus.RUNNING
  
          elif self._state.queue_status == QueueStatus.INACTIVE:
              if self._state.is_door_blocking:
                  return EngineStatus.BLOCKED_BY_OPEN_DOOR
              else:
                  return EngineStatus.PAUSED
  
          else:
              any_running = self._state.running_command_id is not None
              any_queued = len(self._state.queued_command_ids) > 0
  
              if any_running or any_queued:
                  return EngineStatus.RUNNING
              else:
                  return EngineStatus.IDLE
function_tokens: def get_status ( self ) -> EngineStatus : if self . _state . run_result : if not self . _state . is_hardware_stopped : return ( EngineStatus . STOP_REQUESTED if self . _state . run_result == RunResult . STOPPED else EngineStatus . FINISHING ) elif self . _state . run_result == RunResult . FAILED : return EngineStatus . FAILED elif self . _state . run_result == RunResult . SUCCEEDED : return EngineStatus . SUCCEEDED else : return EngineStatus . STOPPED elif self . _state . queue_status == QueueStatus . ACTIVE : return EngineStatus . RUNNING elif self . _state . queue_status == QueueStatus . INACTIVE : if self . _state . is_door_blocking : return EngineStatus . BLOCKED_BY_OPEN_DOOR else : return EngineStatus . PAUSED else : any_running = self . _state . running_command_id is not None any_queued = len ( self . _state . queued_command_ids ) > 0 if any_running or any_queued : return EngineStatus . RUNNING else : return EngineStatus . IDLE