fix pruning

This commit is contained in:
Nils Schneider 2015-03-26 14:21:11 +01:00
parent c93d6c0192
commit 98d4618156

View file

@ -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: