clear whitelist, if it gets cleard.

master
Kraeutergarten 2019-05-19 10:55:11 +02:00
parent 5af250398c
commit 9b02c9272e
1 changed files with 9 additions and 5 deletions

View File

@ -391,10 +391,14 @@ def whitelistUpdate():
while not quit_now: while not quit_now:
start_time = time.time() start_time = time.time()
list = r.hgetall('F2B_WHITELIST') list = r.hgetall('F2B_WHITELIST')
gen_whitelist = []
if list: if list:
new_whitelist = genNetworkList(list) gen_whitelist = genNetworkList(list)
if Counter(new_whitelist) != Counter(WHITELIST):
WHITELIST = new_whitelist if Counter(gen_whitelist) != Counter(WHITELIST):
WHITELIST = gen_whitelist
logInfo('New entrys for whitelist %s' % WHITELIST) logInfo('New entrys for whitelist %s' % WHITELIST)
time.sleep(60.0 - ((time.time() - start_time) % 60.0)) time.sleep(60.0 - ((time.time() - start_time) % 60.0))