api/alfred: Add debug output to investigate yellow routers

This logs cases where the netif is not found in table and thus
AUTO_INCREMENT in netifs table will be raised.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2019-09-30 15:13:45 +02:00
parent 7f012979ad
commit 86b134e12b
1 changed files with 1 additions and 0 deletions

View File

@ -598,6 +598,7 @@ def new_router_stats(mysql, router_id, uptime, router_update, netifdict, statsti
if name in netifdict.keys():
ndata.append((time,router_id,netifdict[name],netif["traffic"]["rx"],netif["traffic"]["tx"],))
else:
writelog(CONFIG["debug_dir"] + "/test_yellow.txt", "{}".format(name))
nkeys.append((name,))
# 99.9 % of the routers will NOT enter this, so the doubled code is not a problem