get a faster response from a change
in the previous implementation, the row-waiting-for-answer class was removed only on the next poll. this should happen more quickly. + remove some print statements
This commit is contained in:
@ -274,7 +274,7 @@ class InfluxGraph(HandlerBase):
|
|||||||
pass # skip not existing or already removed items
|
pass # skip not existing or already removed items
|
||||||
# add remaining curves
|
# add remaining curves
|
||||||
curves.extend(curve_dict.values())
|
curves.extend(curve_dict.values())
|
||||||
print(key, curves)
|
# print(key, curves)
|
||||||
group['curves'] = curves
|
group['curves'] = curves
|
||||||
result.append(group)
|
result.append(group)
|
||||||
return result
|
return result
|
||||||
@ -370,8 +370,8 @@ class InfluxGraph(HandlerBase):
|
|||||||
if len(curve) > l:
|
if len(curve) > l:
|
||||||
del curve[:l]
|
del curve[:l]
|
||||||
else:
|
else:
|
||||||
if fullminute:
|
# if fullminute:
|
||||||
print('R', key)
|
# print('R', key)
|
||||||
result.pop(key)
|
result.pop(key)
|
||||||
# print('poll', sum(len(c) for c in result.values()), self.last_time)
|
# print('poll', sum(len(c) for c in result.values()), self.last_time)
|
||||||
if len(result) > 0:
|
if len(result) > 0:
|
||||||
|
4
secop.py
4
secop.py
@ -153,7 +153,9 @@ class SecopInteractor(SecopClient):
|
|||||||
logging.info('SENDCOMMAND %r', command)
|
logging.info('SENDCOMMAND %r', command)
|
||||||
try:
|
try:
|
||||||
if is_param:
|
if is_param:
|
||||||
self.setParameterFromString(module, parameter, strvalue)
|
entry = self.setParameterFromString(module, parameter, strvalue)
|
||||||
|
item = {'name': f'{module}:{parameter}', 'value': str(entry), 'formatted': entry.formatted()}
|
||||||
|
self.updates[module, parameter] = item
|
||||||
result = True
|
result = True
|
||||||
else:
|
else:
|
||||||
result = self.execCommandFromString(module, parameter, strvalue)[0]
|
result = self.execCommandFromString(module, parameter, strvalue)[0]
|
||||||
|
@ -385,7 +385,6 @@ a {
|
|||||||
title('older than 30 days')
|
title('older than 30 days')
|
||||||
showtitle = 2
|
showtitle = 2
|
||||||
|
|
||||||
print('A', args)
|
|
||||||
out.append(f'<tr><th><a href="/?{"&".join(args)}">{key[1]} / {" ".join(devices)}</a></th>')
|
out.append(f'<tr><th><a href="/?{"&".join(args)}">{key[1]} / {" ".join(devices)}</a></th>')
|
||||||
out.append(f'<td>{daterange}</td></tr>')
|
out.append(f'<td>{daterange}</td></tr>')
|
||||||
if timerange:
|
if timerange:
|
||||||
|
Reference in New Issue
Block a user