proper logging, add signal handler for graceful termination
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import re
|
||||
import logging
|
||||
from ast import literal_eval
|
||||
from streams import Stream
|
||||
from secop import EnumConvert
|
||||
@ -154,7 +155,7 @@ class NicosStream(Stream):
|
||||
if self._init:
|
||||
raise TimeoutError('timeout receiving initial values')
|
||||
except Exception as e:
|
||||
print(self.uri, repr(e))
|
||||
logging.exception('nicos %r', self.uri)
|
||||
return
|
||||
for ts, devname, param, op, value in sorted([t, d, p, o, v] for (d, p), (o, v, t) in events.items()):
|
||||
descr = self.descr.get(devname)
|
||||
|
Reference in New Issue
Block a user