Skip to content

perf(examples): set a timeout on tasks HTTP calls#10244

Merged
auvipy merged 2 commits intocelery:mainfrom
EhteshamSid:fix/set-a-timeout-on-tasks-http-calls
Apr 6, 2026
Merged

perf(examples): set a timeout on tasks HTTP calls#10244
auvipy merged 2 commits intocelery:mainfrom
EhteshamSid:fix/set-a-timeout-on-tasks-http-calls

Conversation

@EhteshamSid
Copy link
Copy Markdown
Contributor

Found a requests.get(url) call in examples/eventlet/tasks.py with no timeout set. If the server is slow or unreachable this will hang indefinitely and block the thread. Added timeout=10.0 - adjust to whatever makes sense for your use case.

@auvipy auvipy requested review from auvipy and Copilot April 6, 2026 05:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.0 to the requests.get(url) call in examples/eventlet/tasks.py.
  • Minor string-quote normalization in the example’s print() statements.

@auvipy auvipy added this to the 5.7.0 milestone Apr 6, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.26%. Comparing base (feb789a) to head (3f9c0cd).
⚠️ Report is 1 commits behind head on main.

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           
Flag Coverage Δ
unittests 88.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@auvipy auvipy merged commit 8d3ff17 into celery:main Apr 6, 2026
320 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants