Skip to content

Commit

Permalink
Fixed rate_limit option on the remote.
Browse files Browse the repository at this point in the history
backports #9607
closes #9610

(cherry picked from commit 39b3000)
  • Loading branch information
ipanova committed Dec 9, 2021
1 parent d7e7f6d commit ba56007
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES/9610.bugfix
@@ -0,0 +1,2 @@
Fixed rate_limit option on the remote which was ignored during the downloads. Rate limit defines
N req/sec per connection ( backported from https://pulp.plan.io/issues/9610).
2 changes: 2 additions & 0 deletions pulp_container/app/downloaders.py
Expand Up @@ -57,6 +57,8 @@ async def _run(self, handle_401=True, extra_data=None):
headers.update(auth_headers)
# aiohttps does not allow to send auth argument and auth header together
self.session._default_auth = None
if self.download_throttler:
await self.download_throttler.acquire()
async with self.session.get(
self.url, headers=headers, proxy=self.proxy, proxy_auth=self.proxy_auth
) as response:
Expand Down

0 comments on commit ba56007

Please sign in to comment.