routertools/alfred: New routers are always 'online'
Since other states are only evaluated correctly on a CHANGE, we set status to 'online' for new routers, so that the second call can log unknown events. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
69fbcd3181
commit
1c80bafc10
|
@ -125,6 +125,7 @@ def import_nodewatcher_xml(mysql, mac, xml):
|
|||
created = mysql.utcnow()
|
||||
#events = [] # don't fire sub-events of created events
|
||||
ru = router_update
|
||||
router_update["status"] = "online" # use 'online' here, as anything different is only evaluated if olddata is present
|
||||
mysql.execute("""
|
||||
INSERT INTO router (status, hostname, created, last_contact, sys_time, sys_uptime, sys_memfree, sys_membuff, sys_memcache,
|
||||
sys_loadavg, sys_procrun, sys_proctot, clients, wan_uplink, cpu, chipset, hardware, os,
|
||||
|
|
Loading…
Reference in New Issue