Skip to content
Snippets Groups Projects
Commit 47153fdc authored by David Trattnig's avatar David Trattnig
Browse files

Generalized the redis field.

parent 28dc900d
No related branches found
No related tags found
No related merge requests found
...@@ -71,6 +71,7 @@ class Monitoring: ...@@ -71,6 +71,7 @@ class Monitoring:
self.status = dict() self.status = dict()
self.status["engine"] = dict() self.status["engine"] = dict()
self.status["soundsystem"] = dict() self.status["soundsystem"] = dict()
self.status["redis"] = dict()
self.status["api"] = dict() self.status["api"] = dict()
self.status["api"]["steering"] = dict() self.status["api"]["steering"] = dict()
self.status["api"]["tank"] = dict() self.status["api"]["tank"] = dict()
...@@ -118,7 +119,7 @@ class Monitoring: ...@@ -118,7 +119,7 @@ class Monitoring:
try: try:
if self.status["soundsystem"]["active"] \ if self.status["soundsystem"]["active"] \
and self.status["soundsystem"]["mixer"]["in_filesystem_0"] \ and self.status["soundsystem"]["mixer"]["in_filesystem_0"] \
and self.status["redis_ready"] \ and self.status["redis"]["active"] \
and self.status["audio_store"]["exists"]: and self.status["audio_store"]["exists"]:
self.status["engine"]["status"] = MonitorResponseCode.OK.value self.status["engine"]["status"] = MonitorResponseCode.OK.value
...@@ -172,11 +173,11 @@ class Monitoring: ...@@ -172,11 +173,11 @@ class Monitoring:
Refreshes the vital status info which are required for the engine to survive. Refreshes the vital status info which are required for the engine to survive.
""" """
self.soundsystem.enable_transaction(self.soundsystem.client) self.soundsystem.enable_transaction(self.soundsystem.client)
self.status["soundsystem"]["active"] = self.soundsystem.is_active() self.status["soundsystem"]["active"] = self.soundsystem.is_active()
self.soundsystem.disable_transaction(self.soundsystem.client) self.soundsystem.disable_transaction(self.soundsystem.client)
self.status["redis_ready"] = self.validate_redis_connection() self.status["redis"]["active"] = self.validate_redis_connection()
self.status["audio_store"] = self.validate_directory(self.config.get("audiofolder")) self.status["audio_store"] = self.validate_directory(self.config.get("audiofolder"))
# After first update start the Heartbeat Monitor # After first update start the Heartbeat Monitor
if not self.heartbeat_running: if not self.heartbeat_running:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment