Skip to content

Commit

Permalink
(fix) Update logs after run_action (EventStreamRuntime) (#3870)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobitege authored Sep 15, 2024
1 parent a97ef34 commit ecf4aed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openhands/runtime/client/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,6 @@ def run_action(self, action: Action) -> Observation:
output = response.json()
obs = observation_from_dict(output)
obs._cause = action.id # type: ignore[attr-defined]
return obs
else:
error_message = response.text
logger.error(f'Error from server: {error_message}')
Expand All @@ -437,6 +436,8 @@ def run_action(self, action: Action) -> Observation:
except Exception as e:
logger.error(f'Error during command execution: {e}')
obs = ErrorObservation(f'Command execution failed: {str(e)}')
# Refresh docker logs
self._wait_until_alive()
return obs

def run(self, action: CmdRunAction) -> Observation:
Expand Down

0 comments on commit ecf4aed

Please sign in to comment.