fix: add cooldown when adding a record because let's encrypt is slow

This commit is contained in:
ptrcnull 2024-03-16 07:35:37 +01:00
parent e3a61d3eb6
commit 312f63d06b
Signed by: ptrcnull
GPG key ID: 411F7B30801DD9CA

View file

@ -58,8 +58,14 @@ def main() -> None:
except dns.resolver.NXDOMAIN:
values = []
log.info('response from DNS: %s', values)
if (args.method == 'begin') == (args.auth in values):
if args.method == 'begin':
# success, but have to wait
# because let's encrypt dns is ??? slow
time.sleep(10)
sys.exit(0)
time.sleep(5)
log.warning('could not ensure the DNS record was created!!')