Updated "Connected" stat information for HBmonitor
This commit is contained in:
parent
958cbdcc58
commit
03e81bfafe
|
@ -203,7 +203,7 @@ def stream_trimmer_loop():
|
||||||
removed = systems[system].STATUS.pop(stream_id)
|
removed = systems[system].STATUS.pop(stream_id)
|
||||||
else:
|
else:
|
||||||
logger.error('(%s) Attemped to remove OpenBridge Stream ID %s not in the Stream ID list: %s', system, int_id(stream_id), [id for id in systems[system].STATUS])
|
logger.error('(%s) Attemped to remove OpenBridge Stream ID %s not in the Stream ID list: %s', system, int_id(stream_id), [id for id in systems[system].STATUS])
|
||||||
|
#print(systems[system].STATUS)
|
||||||
class routerOBP(OPENBRIDGE):
|
class routerOBP(OPENBRIDGE):
|
||||||
|
|
||||||
def __init__(self, _name, _config, _report):
|
def __init__(self, _name, _config, _report):
|
||||||
|
|
|
@ -391,7 +391,7 @@ class HBSYSTEM(DatagramProtocol):
|
||||||
# Build the configuration data strcuture for the peer
|
# Build the configuration data strcuture for the peer
|
||||||
self._peers.update({_peer_id: {
|
self._peers.update({_peer_id: {
|
||||||
'CONNECTION': 'RPTL-RECEIVED',
|
'CONNECTION': 'RPTL-RECEIVED',
|
||||||
'CONNECTED': None,
|
'CONNECTED': time(),
|
||||||
'PINGS_RECEIVED': 0,
|
'PINGS_RECEIVED': 0,
|
||||||
'LAST_PING': time(),
|
'LAST_PING': time(),
|
||||||
'SOCKADDR': _sockaddr,
|
'SOCKADDR': _sockaddr,
|
||||||
|
@ -582,7 +582,7 @@ class HBSYSTEM(DatagramProtocol):
|
||||||
if self._config['LOOSE'] or _peer_id == self._config['RADIO_ID']: # Validate the Radio_ID unless using loose validation
|
if self._config['LOOSE'] or _peer_id == self._config['RADIO_ID']: # Validate the Radio_ID unless using loose validation
|
||||||
logger.warning('(%s) MSTNAK Received. Resetting connection to the Master.', self._system)
|
logger.warning('(%s) MSTNAK Received. Resetting connection to the Master.', self._system)
|
||||||
self._stats['CONNECTION'] = 'NO' # Disconnect ourselves and re-register
|
self._stats['CONNECTION'] = 'NO' # Disconnect ourselves and re-register
|
||||||
self._stats['CONNECTED'] = None
|
self._stats['CONNECTED'] = time()
|
||||||
|
|
||||||
elif _command == 'RPTA': # Actually RPTACK -- an ACK from the master
|
elif _command == 'RPTA': # Actually RPTACK -- an ACK from the master
|
||||||
# Depending on the state, an RPTACK means different things, in each clause, we check and/or set the state
|
# Depending on the state, an RPTACK means different things, in each clause, we check and/or set the state
|
||||||
|
|
Loading…
Reference in New Issue