Reduced the number of calls to get_public_authoritative_nameserver by using a variable

This commit is contained in:
Kush Bavishi 2019-07-31 11:12:28 -07:00
parent 3ba7fdbd49
commit 11cd095131
1 changed files with 2 additions and 1 deletions

View File

@ -129,8 +129,9 @@ def wait_for_dns_change(change_id, account_number=None):
break break
time.sleep(10) time.sleep(10)
if status: if status:
nameserver = get_public_authoritative_nameserver()
for attempts in range(0, number_of_attempts): for attempts in range(0, number_of_attempts):
status = _has_dns_propagated(fqdn, token, get_public_authoritative_nameserver()) status = _has_dns_propagated(fqdn, token, nameserver)
function = sys._getframe().f_code.co_name function = sys._getframe().f_code.co_name
log_data = { log_data = {
"function": function, "function": function,