forgot int

This commit is contained in:
Stefan Midjich 2017-11-16 21:46:05 +01:00
parent 3c69e4374f
commit 5b92fb2b5e
1 changed files with 3 additions and 2 deletions

View File

@ -145,13 +145,14 @@ if args.refresh:
if int(packets_val) != client.last_packets:
client.last_activity = current_date
client.last_packets = packets_val
client.last_packets = int(packets_val)
client.commit()
# Also do a purge of clients that have no traffic for 24 hrs
if client.last_activity:
time_diff = client.last_activity-client.created
if client.last_packets >= packets_val and time_diff.days >= 1:
if client.last_packets >= int(packets_val) and time_diff.days >= 1:
client.enabled = False
client.commit()