Log specific duration of random sleep

This commit is contained in:
Seth Schoen 2018-10-16 14:38:43 -07:00
parent ccbb45bbe1
commit 7ccb29b1d2

View file

@ -1250,8 +1250,9 @@ def renew(config, unused_plugins):
# users all pick the same time for renewals. This delay precedes
# running any hooks, so that side effects of the hooks (such as
# shutting down a web service) aren't prolonged unnecessarily.
logger.info("Non-interactive renewal: delaying for a random time")
time.sleep(random.randint(1, 60*8))
sleep_time = random.randint(1, 60*8)
logger.info("Non-interactive renewal: random delay of %s seconds", sleep_time)
time.sleep(sleep_time)
try:
renewal.handle_renewal_request(config)