Skip to content
Snippets Groups Projects
Commit cf077475 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Also log valid time syncs

parent 2ec8ebc9
No related branches found
No related tags found
No related merge requests found
...@@ -38,14 +38,18 @@ class TimeSyncChecker(kp.Module): ...@@ -38,14 +38,18 @@ class TimeSyncChecker(kp.Module):
self.ch_client.put_message("MSG", "Monitoring Test") self.ch_client.put_message("MSG", "Monitoring Test")
def process(self, blob): def process(self, blob):
dom_ids = [] dom_ids_invalid = []
dom_ids_valid = []
for dom_id, frameinfo in blob['TimesliceFrameInfos'].items(): for dom_id, frameinfo in blob['TimesliceFrameInfos'].items():
valid_time_sync = bool(frameinfo.dom_status[0] & (1 << (32 - 1))) valid_time_sync = bool(frameinfo.dom_status[0] & (1 << (32 - 1)))
if not valid_time_sync: if not valid_time_sync:
dom_ids.append(dom_id) dom_ids_invalid.append(dom_id)
if dom_ids: else:
self.alert("invalid time sync for DOM ID: {}".format(','.join( dom_ids_valid.append(dom_id)
map(str, dom_ids)))) if dom_ids_invalid:
self.alert("invalid time sync for DOM ID: {} /// valid: {}".format(
','.join(map(str, dom_ids_invalid)),
','.join(map(str, dom_ids_valid))))
return blob return blob
def finish(self): def finish(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment