fix lastseen handling of non-alfred nodes

influxdb
Nils Schneider 2015-03-21 10:37:09 +01:00
parent 2a2db65bc6
commit 3ddecd26bf
1 changed files with 1 additions and 1 deletions

View File

@ -30,6 +30,7 @@ def prune_nodes(nodes, now, days):
del nodes[node_id] del nodes[node_id]
def mark_online(node, now): def mark_online(node, now):
node['lastseen'] = now.isoformat()
node.setdefault('firstseen', now.isoformat()) node.setdefault('firstseen', now.isoformat())
node['flags']['online'] = True node['flags']['online'] = True
@ -41,7 +42,6 @@ def import_nodeinfo(nodes, nodeinfos, now, assume_online=False):
node['flags']['gateway'] = False node['flags']['gateway'] = False
if assume_online: if assume_online:
node['lastseen'] = now.isoformat()
mark_online(node, now) mark_online(node, now)
def reset_statistics(nodes): def reset_statistics(nodes):