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

Track in flight requests #376

Merged
merged 3 commits into from
Mar 28, 2024
Merged

Track in flight requests #376

merged 3 commits into from
Mar 28, 2024

Conversation

imjoehaines
Copy link
Contributor

Goal

This PR adds a RequestTracker class that can be used to (surprise surprise) track requests:

request_tracker = RequestTracker()
mark_request_complete = request_tracker.new_request()
request_tracker.has_in_flight_requests() # => True

# ...make the request...

mark_request_complete()
request_tracker.has_in_flight_requests() # => False

The Client and SessionTracker use this, along with post-delivery callbacks (#375), to keep track of when there are in-flight event or session requests

@tomlongridge tomlongridge requested a review from Cawllec March 27, 2024 15:06
Base automatically changed from post-delivery-callbacks to next March 28, 2024 09:19
This is an internal class for tracking outstanding event & session
requests made by a Client
@imjoehaines imjoehaines force-pushed the track-in-flight-requests branch from eb532df to 675adb3 Compare March 28, 2024 09:19
@imjoehaines imjoehaines merged commit eb808ab into next Mar 28, 2024
20 checks passed
@imjoehaines imjoehaines deleted the track-in-flight-requests branch March 28, 2024 09:38
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.

2 participants