Skip to content

Commit

Permalink
Reset failure counter in the correct location
Browse files Browse the repository at this point in the history
Previously, the failure counter would not be reset between tasks when
running a mission wise mission. Instead, if it reached the counter once
all subsequent tasks would fail with an ever increasing counter.
  • Loading branch information
aeshub committed Dec 2, 2024
1 parent 954a75b commit 9647296
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/isar/state_machine/states/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def stop(self) -> None:
if self.task_status_thread:
self.task_status_thread.wait_for_thread()
self.task_status_thread = None
self.request_status_failure_counter = 0

def _run(self) -> None:
transition: Callable
Expand Down Expand Up @@ -197,6 +196,7 @@ def _queue_inspections_for_upload(
self.logger.info(f"Inspection: {str(inspection.id)[:8]} queued for upload")

def _report_task_status(self, task: Task) -> None:
self.request_status_failure_counter = 0
if task.status == TaskStatus.Failed:
self.logger.warning(
f"Task: {str(task.id)[:8]} was reported as failed by the robot"
Expand Down

0 comments on commit 9647296

Please sign in to comment.