removing a streams must never be pre-dated
This commit is contained in:
13
seinflux.py
13
seinflux.py
@@ -381,12 +381,13 @@ class SEHistory(InfluxDBWrapper):
|
|||||||
:param ts: the time or None when now
|
:param ts: the time or None when now
|
||||||
"""
|
"""
|
||||||
flag = value is not None
|
flag = value is not None
|
||||||
try:
|
if flag:
|
||||||
previns, prevts = self.get_instrument(stream, ts, **tags)
|
try:
|
||||||
if prevts is not None and (previns is None or (ts or 1e10) < prevts):
|
previns, prevts = self.get_instrument(stream, ts, **tags)
|
||||||
ts = prevts + 0.001
|
if prevts is not None and (previns is None or (ts or 1e10) < prevts):
|
||||||
except Exception as e:
|
ts = prevts + 0.001
|
||||||
print(f'Exception in get_instrument {e!r}')
|
except Exception as e:
|
||||||
|
print(f'Exception in get_instrument {e!r}')
|
||||||
tags['stream'] = stream
|
tags['stream'] = stream
|
||||||
if flag:
|
if flag:
|
||||||
tags['instrument'] = value
|
tags['instrument'] = value
|
||||||
|
|||||||
Reference in New Issue
Block a user