Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix retry_interval: set it to 1 second instead of 1000 seconds #14357

Merged
merged 2 commits into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def __len__(self):
async def __anext__(self):
retry_active = True
retry_total = 3
retry_interval = 1000
retry_interval = 1 # 1 second
while retry_active:
try:
chunk = await self.response.internal_response.content.read(self.block_size)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ async def __anext__(self):
loop = _get_running_loop()
retry_active = True
retry_total = 3
retry_interval = 1000
retry_interval = 1 # 1 second
while retry_active:
try:
chunk = await loop.run_in_executor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def __iter__(self):
def __next__(self):
retry_active = True
retry_total = 3
retry_interval = 1000
retry_interval = 1 # 1 second
while retry_active:
try:
chunk = next(self.iter_content_func)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async def __anext__(self):
if retry_total <= 0:
retry_active = False
else:
await trio.sleep(1000)
await trio.sleep(1)
headers = {'range': 'bytes=' + str(self.downloaded) + '-'}
resp = self.pipeline.run(self.request, stream=True, headers=headers)
if resp.status_code == 416:
Expand Down