mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 07:12:54 -04:00
change random sleep to use fractional seconds (#7473)
If we use fractional instead of whole seconds for the random sleep before renewing, it will reduce bunching of requests to Let's Encrypt's API.
This commit is contained in:
parent
6fcdfb0e50
commit
6f711d9ae8
1 changed files with 1 additions and 1 deletions
|
|
@ -434,7 +434,7 @@ def handle_renewal_request(config): # pylint: disable=too-many-locals,too-many-
|
|||
if should_renew(lineage_config, renewal_candidate):
|
||||
# Apply random sleep upon first renewal if needed
|
||||
if apply_random_sleep:
|
||||
sleep_time = random.randint(1, 60 * 8)
|
||||
sleep_time = random.uniform(1, 60 * 8)
|
||||
logger.info("Non-interactive renewal: random delay of %s seconds",
|
||||
sleep_time)
|
||||
time.sleep(sleep_time)
|
||||
|
|
|
|||
Loading…
Reference in a new issue