mirror of https://github.com/CIRCL/AIL-framework
fix: [d4] change enable d4
parent
4cd2b6517b
commit
70802205f2
|
@ -50,8 +50,8 @@ def is_passive_dns_enabled(cache=True):
|
||||||
def change_passive_dns_state(new_state):
|
def change_passive_dns_state(new_state):
|
||||||
old_state = is_passive_dns_enabled(cache=False)
|
old_state = is_passive_dns_enabled(cache=False)
|
||||||
if old_state != new_state:
|
if old_state != new_state:
|
||||||
r_serv_db.hset('d4:passivedns', 'enabled', bool(new_state))
|
r_serv_db.hset('d4:passivedns', 'enabled', str(new_state))
|
||||||
r_cache.set('d4:passivedns:enabled', bool(new_state))
|
r_cache.set('d4:passivedns:enabled', str(new_state))
|
||||||
update_time = time.time()
|
update_time = time.time()
|
||||||
r_serv_db.hset('d4:passivedns', 'update_time', update_time)
|
r_serv_db.hset('d4:passivedns', 'update_time', update_time)
|
||||||
r_cache.set('d4:passivedns:last_update_time', update_time)
|
r_cache.set('d4:passivedns:last_update_time', update_time)
|
||||||
|
|
Loading…
Reference in New Issue