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

Return early from concurrency() and rate_limit() without limit names #14789

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

abrookins
Copy link
Collaborator

If a user calls concurrency() or rate_limit() and passes a None value or an empty collection, return early to avoid making unnecessary API requests.

Fixes #14786

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • If this pull request removes docs files, it includes redirect settings in mint.json.
  • If this pull request adds functions or classes, it includes helpful docstrings.

@abrookins abrookins requested a review from cicdw as a code owner July 29, 2024 23:24
@abrookins abrookins added the enhancement An improvement of an existing feature label Jul 29, 2024
@abrookins abrookins assigned abrookins and jakekaplan and unassigned abrookins Jul 29, 2024
Copy link

codspeed-hq bot commented Jul 29, 2024

CodSpeed Performance Report

Merging #14789 will not alter performance

Comparing issue-14786 (eab1118) with main (b3c9a71)

Summary

✅ 5 untouched benchmarks

Copy link
Member

@cicdw cicdw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beautiful

@cicdw cicdw merged commit 0335c76 into main Jul 30, 2024
30 checks passed
@cicdw cicdw deleted the issue-14786 branch July 30, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global concurency utilities should return early if no limit names are given
3 participants