fix: [d4] change enable d4

pull/594/head
Terrtia 2023-06-07 11:03:32 +02:00
parent 4cd2b6517b
commit 70802205f2
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 2 additions and 2 deletions

View File

@ -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)