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
Add rate_limit option to Remote #1091
Conversation
Required PR: pulp/pulpcore#1091 [noissue]
Required PR: pulp/pulpcore#1091 [noissue]
CHANGES/7965.feature
Outdated
| @@ -0,0 +1 @@ | |||
| Add ``rate_limit`` option to ``Remote`` | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since users don't use this directly I think this changelog should be for plugin writers instead.
|
Attached issue: https://pulp.plan.io/issues/7965 |
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('core', '0054_add_public_key'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is now a migration 55. https://github.com/pulp/pulpcore/tree/master/pulpcore/app/migrations
| @property | ||
| def download_throttler(self): | ||
| """ | ||
| Return the Throttler which can be used to rate limit downloaders. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This dostring should have a 1-sentence summary with a line separator in between.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
pulpcore/app/models/repository.py
Outdated
| Throttler: The instantiated Throttler to be used by | ||
| get_downloader() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Throttler: The instantiated Throttler to be used by | |
| get_downloader() | |
| Throttler: The instantiated Throttler to be used by get_downloader() |
pulpcore/app/models/repository.py
Outdated
| from asyncio_throttle import Throttler | ||
| import django |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| from asyncio_throttle import Throttler | |
| import django | |
| import django | |
| from asyncio_throttle import Throttler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM a couple small suggestions.
|
I see two approvals! |
https://pulp.plan.io/issues/7965
closes #7965
Please be sure you have read our documentation on creating PRs:
https://docs.pulpproject.org/contributing/pull-request-walkthrough.html