MCPcopy Create free account
hub / github.com/apache/httpd / await_completion

Method await_completion

test/modules/md/md_env.py:473–500  ·  view source on GitHub ↗
(self, names, must_renew=False, restart=True, timeout=60,
                         via_domain=None, use_https=True)

Source from the content-addressed store, hash-verified

471 return self.get_content(via_domain, "/server-status%s" % query, use_https=use_https)
472
473 def await_completion(self, names, must_renew=False, restart=True, timeout=60,
474 via_domain=None, use_https=True):
475 try_until = time.time() + timeout
476 renewals = {}
477 names = names.copy()
478 while len(names) > 0:
479 if time.time() >= try_until:
480 return False
481 for name in names:
482 mds = self.get_md_status(name, via_domain=via_domain, use_https=use_https)
483 if mds is None:
484 log.debug("not managed by md: %s" % name)
485 return False
486
487 if 'renewal' in mds:
488 renewal = mds['renewal']
489 renewals[name] = True
490 if 'finished' in renewal and renewal['finished'] is True:
491 if (not must_renew) or (name in renewals):
492 log.debug(f"domain cert was renewed: {name}")
493 names.remove(name)
494
495 if len(names) != 0:
496 time.sleep(0.1)
497 if restart:
498 time.sleep(0.1)
499 return self.apache_restart() == 0
500 return True
501
502 def is_renewing(self, name):
503 stat = self.get_certificate_status(name)

Callers 15

test_md_790_001Method · 0.80
test_md_790_002Method · 0.80
test_md_790_003Method · 0.80
test_md_710_001Method · 0.80
test_md_710_002Method · 0.80
test_md_710_003Method · 0.80
_class_scopeMethod · 0.80
test_md_801_011Method · 0.80
test_md_741_002Method · 0.80
test_md_751_001Method · 0.80
test_md_751_004Method · 0.80
test_md_751_020Method · 0.80

Calls 2

get_md_statusMethod · 0.95
apache_restartMethod · 0.80

Tested by 15

test_md_790_001Method · 0.64
test_md_790_002Method · 0.64
test_md_790_003Method · 0.64
test_md_710_001Method · 0.64
test_md_710_002Method · 0.64
test_md_710_003Method · 0.64
_class_scopeMethod · 0.64
test_md_801_011Method · 0.64
test_md_741_002Method · 0.64
test_md_751_001Method · 0.64
test_md_751_004Method · 0.64
test_md_751_020Method · 0.64