Skip to content

Remove warning for inactive request counter in active_requests method#466

Merged
aniketmaurya merged 1 commit intomainfrom
aniket/opt-in-active-request-counter
Apr 10, 2025
Merged

Remove warning for inactive request counter in active_requests method#466
aniketmaurya merged 1 commit intomainfrom
aniket/opt-in-active-request-counter

Conversation

@aniketmaurya
Copy link
Copy Markdown
Collaborator

What does this PR do?

Tracking the number of active requests is an opt-in feature and users should not see the warning if it's not enabled.

This PR removes a warning message from the active_requests method when the active request counter is not enabled.

/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/litserve/server.py:388: UserWarning: Active request counter is not enabled while using `on_request` callback hook. Please set track_requests=True in the LitServer.`
Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89%. Comparing base (c539758) to head (2dd77be).
Report is 1 commits behind head on main.

Additional details and impacted files
@@         Coverage Diff         @@
##           main   #466   +/-   ##
===================================
- Coverage    89%    89%   -0%     
===================================
  Files        37     37           
  Lines      2159   2158    -1     
===================================
- Hits       1914   1913    -1     
  Misses      245    245           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aniketmaurya aniketmaurya merged commit f456c51 into main Apr 10, 2025
21 checks passed
@aniketmaurya aniketmaurya deleted the aniket/opt-in-active-request-counter branch April 10, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants