further rework

- dump all every full hour
- finish all streams properly on exit
This commit is contained in:
2025-02-11 10:51:37 +01:00
parent 50f8c349ee
commit ce205f47a2
6 changed files with 386 additions and 296 deletions

View File

@ -116,7 +116,10 @@ class NicosStream(Stream):
def ping(self):
self.send(f'{PING}{OP_ASK}')
def events(self, matchmsg=msg_pattern.match):
def get_tags(self, key):
return self.tags
def event_generator(self, matchmsg=msg_pattern.match):
if self.is_offline():
return
events = {}
@ -168,4 +171,4 @@ class NicosStream(Stream):
value = None
error = 'error'
cnt += 1
yield key, value, error, ts, self.tags
yield key, value, error, ts, self.get_tags(key)