Skip to content

fix: Flush events on process exit - #224

Merged
dustinbyrne merged 3 commits into
PostHog:mainfrom
atuinsh:fix/flush-on-process-exit
Oct 8, 2026
Merged

dustinbyrne merged 3 commits into
PostHog:mainfrom
atuinsh:fix/flush-on-process-exit

Conversation

@markovejnovic

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

Fixes #223.

💚 How did you test it?

Ran mix test test/posthog/sender_test.exs on the first commit (which correctly tied the supervision to the test harness), which failed. Then ran mix test test/posthog/sender_test.exs on the second commit which succeeded. Proof attached as screenshots.

image

Thank you!

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

@markovejnovic
markovejnovic requested a review from a team as a code owner October 7, 2026 22:53
@ellie

ellie commented Oct 7, 2026

Copy link
Copy Markdown

cc @fuziontech ;P

@markovejnovic markovejnovic changed the title Fix/flush on process exit fix: Flush events on process exit Oct 7, 2026

@fuziontech fuziontech left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice catch! Thanks for the PR and fix!!

@markovejnovic

markovejnovic commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

ugh okay commit signing. i need to set up my gpg, give me a second

@dustinbyrne dustinbyrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ugh okay commit signing. i need to set up my gpg, give me a second

😅 thank you! do you mind adding a changeset so this triggers an official release once we merge? otherwise the change looks good!

@markovejnovic

Copy link
Copy Markdown
Contributor Author

Sounds good, thank you @dustinbyrne =), finally got my gpg configured, on both of those now =)

@markovejnovic
markovejnovic force-pushed the fix/flush-on-process-exit branch from 07c4ca0 to ee66007 Compare October 8, 2026 01:06
@markovejnovic

Copy link
Copy Markdown
Contributor Author

done, thanks @dustinbyrne

@dustinbyrne

Copy link
Copy Markdown
Contributor

thank you!

@dustinbyrne
dustinbyrne merged commit b8c77e0 into PostHog:main Oct 8, 2026
29 checks passed
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.

Failing to flush events on application crash

4 participants