fix pruning
parent
c93d6c0192
commit
98d4618156
|
@ -22,9 +22,9 @@ def prune_nodes(nodes, now, days):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
lastseen = datetime.strptime(node['lastseen'], '%Y-%m-%dT%H:%M:%S')
|
lastseen = datetime.strptime(node['lastseen'], '%Y-%m-%dT%H:%M:%S')
|
||||||
delta = (now - lastseen).seconds
|
delta = (now - lastseen).days
|
||||||
|
|
||||||
if delta >= days * 86400:
|
if delta >= days:
|
||||||
prune.append(node_id)
|
prune.append(node_id)
|
||||||
|
|
||||||
for node_id in prune:
|
for node_id in prune:
|
||||||
|
|
Loading…
Reference in New Issue