strip leading underscore from secop parameter names

+ other fixes and debugging prints
This commit is contained in:
l_samenv
2025-03-28 11:37:11 +01:00
parent 029309a06b
commit 335d0a5078
4 changed files with 37 additions and 23 deletions

View File

@ -74,7 +74,7 @@ class Stream(Base):
self.connect()
self.init(**kwds)
except Exception as e:
print('I', self.uri, repr(e))
print('FAIL', self.uri, repr(e))
raise
def connect(self):
@ -276,10 +276,12 @@ class EventStream:
while 1:
for stream in self.wait_ready(1):
if not isinstance(stream, Stream):
# stream is a UdpStream
for streamcls, uri, kwargs in stream.events():
stream = self.streams.get(uri)
if stream:
stream.tags.update(kwargs)
print('update stream', uri, kwargs)
else:
try:
self.streams[uri] = stream = streamcls(uri, **kwargs)
@ -288,7 +290,7 @@ class EventStream:
print('can not connect to', uri, repr(e), streamcls)
continue
device = stream.tags.get('device')
events.append(('stream', kwargs.get('instrument', '0'),
events.append(('stream', kwargs.get('instrument'),
{'device': device}, stream.uri, int(time.time())))
for name, stream in self.streams.items():
try: