Skip to content

Commit

Permalink
#60 apply unhealthy auto-mark timeout to drivers in initialized state…
Browse files Browse the repository at this point in the history
… too
  • Loading branch information
DarylDohner committed Jul 4, 2023
1 parent 68a8c6d commit 1332079
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion EosPayload/lib/orcheostrator/orcheostrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ def _health_check(self) -> None:
driver.update_status(Status.TERMINATED)

# auto set unhealthy if we haven't had a ping in the last 30s from this device
if driver.status == Status.HEALTHY and driver.status_since < (datetime.now() - timedelta(seconds=30)):
if driver.status in [Status.INITIALIZED, Status.HEALTHY] \
and driver.status_since < (datetime.now() - timedelta(seconds=30)):
self._logger.critical(f"haven't received a health ping from driver {key} in 30s -- marking unhealthy")
driver.update_status(Status.UNHEALTHY)

Expand Down

0 comments on commit 1332079

Please sign in to comment.