Skip to content

Commit

Permalink
reverso and todo
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxColoring committed Mar 18, 2024
1 parent dcedf68 commit 1c3d542
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/src/opentrons/protocol_engine/state/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,12 @@ def get_all_commands_final(self) -> bool:
# TODO(mm, 2024-03-14): This is a slow O(n) scan. When a long run ends and
# we reach this loop, it can disrupt the robot server.
# https://opentrons.atlassian.net/browse/EXEC-55
for command_id in self._state.all_command_ids:
for command_id in reversed(self._state.all_command_ids):
command = self._state.commands_by_id[command_id].command
# TODO: Not quite right. If a command fails, and then we recover from it,
# and then the rest of the run goes on to succeed, this will raise an error,
# that then gets fed back in and treated as the fatal run error.
# We probably don't want to do that.
if command.error and command.intent != CommandIntent.SETUP:
# TODO(tz, 7-11-23): avoid raising an error and return the status instead
raise ProtocolCommandFailedError(
Expand Down

0 comments on commit 1c3d542

Please sign in to comment.