Files
IoT-Systems/utils/check-up.py
hasslesstech 16b8fe9d56
Some checks failed
Component testing / Hub testing (push) Successful in 23s
Component testing / Store testing (push) Successful in 20s
Component testing / Integration smoke testing (push) Failing after 1m23s
[P] Add general smoke test and Store incremental test
2026-03-23 17:47:42 +02:00

20 lines
414 B
Python

import sys
print("Checking for dead containers...")
l = [i for i in sys.stdin.read().split("\n") if i]
header, statuses = l[0], l[1:]
status_index = header.find('STATUS')
name_index = header.find('NAMES')
exit_code = 0
for i in statuses:
if not i[status_index:].startswith("Up "):
service_name = i[name_index:]
print(f"Crash detected in {service_name}")
exit_code = 1
sys.exit(1)