Skip to content

Commit 0c065c7

Browse files
authored
Merge pull request #580 from cglewis/main
actually check if the container is running
2 parents b113ad0 + dfdda5e commit 0c065c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

PiBuoyV2/services/sense/sense_app.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,11 @@ def check_version(self, timestamp):
231231
healthy = True
232232
for container in containers:
233233
try:
234+
container = self.docker.containers.get("pibuoyv2_"+container+"_1")
235+
if container.status != 'running':
236+
healthy = False
234237
self.sensor_data["version_"+container].append(
235-
[self.get_container_version(self.docker.containers.get("pibuoyv2_"+container+"_1")), timestamp])
238+
[self.get_container_version(container), timestamp])
236239
except Exception as e:
237240
self.sensor_data["version_"+container].append([str(e), timestamp])
238241
healthy = False

0 commit comments

Comments
 (0)