Skip to content

Commit

Permalink
Add comment, correct leveling
Browse files Browse the repository at this point in the history
  • Loading branch information
JackUrb committed Jul 15, 2022
1 parent 4953014 commit ae01e44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mephisto/abstractions/_subcomponents/task_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,9 @@ def _launch_and_run_unit(
if unit_agent is not None and unit_agent.db_id == agent.db_id:
logger.debug(f"Clearing {agent} from {unit} due to {e}")
unit.clear_assigned_agent()
if agent.get_status() not in AgentState.complete():
agent.update_status(AgentState.STATUS_DISCONNECT)
if agent.get_status() not in AgentState.complete():
# Absent agents at this stage should be disconnected
agent.update_status(AgentState.STATUS_DISCONNECT)
self.cleanup_unit(unit)
except Exception as e:
logger.exception(f"Unhandled exception in unit {unit}", exc_info=True)
Expand Down

0 comments on commit ae01e44

Please sign in to comment.