Skip to content

Commit

Permalink
Move logging statement of retry in healthy method into else to only l…
Browse files Browse the repository at this point in the history
…og when it will retry.
  • Loading branch information
dboulware committed May 13, 2024
1 parent 8a732a8 commit 5a503d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scos_actions/hardware/sigan_iface.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ def healthy(self, num_samples: int = 56000, retries: int = 3) -> bool:
break
except BaseException as e:
retries -= 1
logger.debug(
"Unable to acquire samples during health check. Retrying..."
)
if retries == 0:
logger.exception(
"Unable to acquire samples from device during health check."
)
return False
else:
logger.debug(
"Unable to acquire samples during health check. Retrying..."
)

if not len(data) == num_samples:
logger.error("Data length doesn't match request.")
Expand Down

0 comments on commit 5a503d9

Please sign in to comment.