mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-02-02 09:55:52 +00:00
py-i2phosts-maint: improve log messages
This commit is contained in:
parent
76e49cfa11
commit
0f66ec2d49
@ -40,13 +40,13 @@ for host in all_hosts:
|
||||
# delete external hosts which we never seen after 365 days of inactivity
|
||||
if host.external == True:
|
||||
if dl > datetime.timedelta(days=365):
|
||||
log.info('deleting %s, reason: external host, 365 days inactive', host.name)
|
||||
log.info('deleting %s, reason: external host, never seen for 365 days', host.name)
|
||||
host.delete()
|
||||
continue
|
||||
# delete hosts added by us and never seen after 14 days of inactivity
|
||||
else:
|
||||
if dl > datetime.timedelta(days=14):
|
||||
log.info('deleting %s, reason: internal host, 14 days inactive', host.name)
|
||||
log.info('deleting %s, reason: internal host, never seen for 14 days', host.name)
|
||||
host.delete()
|
||||
continue
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user