Merge "No need to do a shutdown(wait=True) when in a context-manager"
This commit is contained in:
commit
a6b3c798bf
@ -35,7 +35,6 @@ class HealthManager(object):
|
||||
amp_health_repo = repo.AmphoraHealthRepository()
|
||||
|
||||
with futures.ThreadPoolExecutor(max_workers=self.threads) as executor:
|
||||
try:
|
||||
# Don't start checking immediately, as the health manager may
|
||||
# have been down for a while and amphorae not able to check in.
|
||||
LOG.debug("Pausing before starting health check")
|
||||
@ -57,5 +56,3 @@ class HealthManager(object):
|
||||
LOG.info("Failed over %s amphora",
|
||||
failover_count)
|
||||
time.sleep(CONF.health_manager.health_check_interval)
|
||||
finally:
|
||||
executor.shutdown(wait=True)
|
||||
|
@ -110,7 +110,6 @@ class CertRotation(object):
|
||||
amp_repo = repo.AmphoraRepository()
|
||||
|
||||
with futures.ThreadPoolExecutor(max_workers=self.threads) as executor:
|
||||
try:
|
||||
session = db_api.get_session()
|
||||
rotation_count = 0
|
||||
while True:
|
||||
@ -123,5 +122,3 @@ class CertRotation(object):
|
||||
if rotation_count > 0:
|
||||
LOG.info("Rotated certificates for %s amphora" %
|
||||
rotation_count)
|
||||
finally:
|
||||
executor.shutdown(wait=True)
|
||||
|
Loading…
Reference in New Issue
Block a user