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

feat: option to emit event to bus upon message sent #1261

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

adklempner
Copy link
Member

@adklempner adklempner commented Nov 29, 2024

Description

Adds an option when creating message sender to emit an event each time a message is sent.

Changes

  • new option WithMessageSender which instructs MessageSender to push an event to the EventBus each time a message is sent
  • new event MessageSent containing timestamp and payload size

Tests

Added a new unit test and tested locally in status-go via this PR status-im/status-go#6157

@status-im-auto
Copy link

status-im-auto commented Nov 29, 2024

Jenkins Builds

Click to see older builds (4)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 86c0a99 #1 2024-11-29 02:20:12 ~2 min unknown 📄log
✔️ bfd8616 #2 2024-11-29 02:49:58 ~2 min unknown 📄log
✔️ afe7ed1 #3 2024-11-29 03:45:51 ~2 min unknown 📄log
✔️ af6dfb6 #4 2024-12-03 01:29:08 ~2 min unknown 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 9854507 #5 2024-12-03 01:51:25 ~2 min unknown 📄log
✔️ e42da3a #6 2024-12-03 03:08:00 ~2 min unknown 📄log

@adklempner adklempner force-pushed the feat/message-sent-event branch 2 times, most recently from bfd8616 to afe7ed1 Compare November 29, 2024 03:43
Copy link
Collaborator

@chaitanyaprem chaitanyaprem left a comment

Choose a reason for hiding this comment

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

change LGTM, but test needs to be fixed that is failing.

probably due to invoking wg.wait in a go routine.

@adklempner adklempner force-pushed the feat/message-sent-event branch from 9854507 to e42da3a Compare December 3, 2024 03:05
@adklempner
Copy link
Member Author

change LGTM, but test needs to be fixed that is failing.

probably due to invoking wg.wait in a go routine.

fixed, the problem was not closing the subscription (it got triggered after the test ended making it fail)

@adklempner adklempner merged commit 6550ff3 into master Dec 3, 2024
11 of 12 checks passed
@adklempner adklempner deleted the feat/message-sent-event branch December 3, 2024 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants