api/alfred: Only log reboot if uptime difference greater than 5 min
If we have two gateways per hood, uptime may vary and cause frequent logged reboots. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
de7c5b2874
commit
c3adf5fd68
|
@ -265,7 +265,7 @@ def import_nodewatcher_xml(mysql, mac, xml, banned, netifdict):
|
|||
if olddata:
|
||||
# fire events
|
||||
with suppress(KeyError, TypeError, UnboundLocalError):
|
||||
if olddata["sys_uptime"] > router_update["sys_uptime"]:
|
||||
if (olddata["sys_uptime"] - 300) > router_update["sys_uptime"]:
|
||||
events_append(mysql,router_id,"reboot","")
|
||||
|
||||
with suppress(KeyError, TypeError, UnboundLocalError):
|
||||
|
|
Loading…
Reference in New Issue