Skip to content

Commit c3ec2e2

Browse files
committed
.
1 parent 0208255 commit c3ec2e2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/populate_tox/populate_tox.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
lstrip_blocks=True,
3737
)
3838

39-
PYPI_COOLDOWN = 0.2 # seconds to wait between requests to PyPI
39+
PYPI_COOLDOWN = 0.15 # seconds to wait between requests to PyPI
4040

4141
PYPI_PROJECT_URL = "https://pypi.python.org/pypi/{project}/json"
4242
PYPI_VERSION_URL = "https://pypi.python.org/pypi/{project}/{version}/json"
@@ -97,11 +97,11 @@ def fetch_url(url: str) -> Optional[dict]:
9797
if pypi_data.status_code == 200:
9898
return pypi_data.json()
9999

100-
cooldown = PYPI_COOLDOWN * 2**attempt
100+
backoff = PYPI_COOLDOWN * 2**attempt
101101
print(
102-
f"{url} returned an error: {pypi_data.status_code}. Attempt {attempt + 1}/3. Waiting {cooldown}s"
102+
f"{url} returned an error: {pypi_data.status_code}. Attempt {attempt + 1}/3. Waiting {backoff}s"
103103
)
104-
time.sleep(cooldown)
104+
time.sleep(backoff)
105105

106106
return None
107107

0 commit comments

Comments
 (0)