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

Ensure sessions are sent at exit #371

Merged
merged 3 commits into from
Feb 26, 2024
Merged

Ensure sessions are sent at exit #371

merged 3 commits into from
Feb 26, 2024

Conversation

imjoehaines
Copy link
Member

Goal

We use an atexit hook to deliver any outstanding sessions when the process exits, but this delivery happens asynchronously and therefore isn't guaranteed to finish

This PR adds an options parameter to deliver_sessions (matching deliver) that allows forcing synchronous delivery and then uses this to send sessions synchronously at exit


# deliver_sessions is _technically_ optional in that if you disable
# session tracking it will never be called
# this should be made mandatory in the next major release
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest raising a ticket for this, that we'll target against v5.x.

@imjoehaines imjoehaines merged commit 77e1174 into next Feb 26, 2024
20 checks passed
@imjoehaines imjoehaines deleted the send-sessions-at-exit branch February 26, 2024 10:57
@imjoehaines imjoehaines mentioned this pull request Mar 4, 2024
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.

None yet

2 participants