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
|
||||
"""
|
||||
flag = value is not None
|
||||
try:
|
||||
previns, prevts = self.get_instrument(stream, ts, **tags)
|
||||
if prevts is not None and (previns is None or (ts or 1e10) < prevts):
|
||||
ts = prevts + 0.001
|
||||
except Exception as e:
|
||||
print(f'Exception in get_instrument {e!r}')
|
||||
if flag:
|
||||
try:
|
||||
previns, prevts = self.get_instrument(stream, ts, **tags)
|
||||
if prevts is not None and (previns is None or (ts or 1e10) < prevts):
|
||||
ts = prevts + 0.001
|
||||
except Exception as e:
|
||||
print(f'Exception in get_instrument {e!r}')
|
||||
tags['stream'] = stream
|
||||
if flag:
|
||||
tags['instrument'] = value
|
||||
|
||||
Reference in New Issue
Block a user