perf(examples): set a timeout on tasks HTTP calls#10244
Merged
auvipy merged 2 commits intocelery:mainfrom Apr 6, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Eventlet example task to avoid indefinite hangs on outbound HTTP requests by setting a requests.get() timeout.
Changes:
- Add
timeout=10.0to therequests.get(url)call inexamples/eventlet/tasks.py. - Minor string-quote normalization in the example’s
print()statements.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10244 +/- ##
=======================================
Coverage 88.26% 88.26%
=======================================
Files 153 153
Lines 19649 19649
Branches 2265 2265
=======================================
Hits 17343 17343
Misses 2005 2005
Partials 301 301
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
auvipy
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found a
requests.get(url)call inexamples/eventlet/tasks.pywith no timeout set. If the server is slow or unreachable this will hang indefinitely and block the thread. Addedtimeout=10.0- adjust to whatever makes sense for your use case.