fix lastseen handling of non-alfred nodes
parent
2a2db65bc6
commit
3ddecd26bf
2
nodes.py
2
nodes.py
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue