cache host failures for a shorter time
This commit is contained in:
parent
174448a2b0
commit
3294a44f76
1 changed files with 3 additions and 0 deletions
|
@ -1373,6 +1373,9 @@ if __name__ == "__main__":
|
||||||
serverAge = datetime.now(serverInfo['last_checked'].tzinfo) - serverInfo['last_checked']
|
serverAge = datetime.now(serverInfo['last_checked'].tzinfo) - serverInfo['last_checked']
|
||||||
if(serverAge.total_seconds() > arguments.remember_hosts_for_days * 24 * 60 * 60 ):
|
if(serverAge.total_seconds() > arguments.remember_hosts_for_days * 24 * 60 * 60 ):
|
||||||
seen_hosts.pop(host)
|
seen_hosts.pop(host)
|
||||||
|
elif('info' in serverInfo and serverInfo['info'] == None and serverAge.total_seconds() > 60 * 60 ):
|
||||||
|
# Don't cache failures for more than 24 hours
|
||||||
|
seen_hosts.pop(host)
|
||||||
else:
|
else:
|
||||||
seen_hosts = ServerList({})
|
seen_hosts = ServerList({})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue