Rename DCC project into RAM

RAM: Railroad Assets Manager
This commit is contained in:
2022-04-10 21:05:02 +02:00
parent 305507a4e6
commit d594dbe47c
77 changed files with 16 additions and 16 deletions

22
ram/driver/health.py Normal file
View File

@@ -0,0 +1,22 @@
from health_check.backends import BaseHealthCheckBackend
from health_check.exceptions import (
ServiceUnavailable,
ServiceReturnedUnexpectedResult,
)
from driver.connector import Connector
class DriverHealthCheck(BaseHealthCheckBackend):
critical_service = False
def check_status(self):
try:
Connector().passthrough(b"<s>")
except ConnectionRefusedError as e:
self.add_error(ServiceUnavailable("IOError"), e)
except Exception as e:
self.add_error(ServiceReturnedUnexpectedResult("IOError"), e)
def identifier(self):
return "DriverDaemon"