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

Enhance event processing by tracking failed events and updating statistics #4

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

fadhilyori
Copy link
Member

This pull request introduces several changes to the internal/app/app.go file to improve error handling and logging for failed events. The key changes include adding a failedCount field to the CompletedEvent struct, updating the processMessage method to return the count of failed events, and modifying the PrintStats method to include the total number of failed events in the log output.

Enhancements to error handling and logging:

  • internal/app/app.go: Added failedCount field to the CompletedEvent struct to track the number of failed events.
  • internal/app/app.go: Updated the App struct to include a total field to keep track of the total number of processed events.
  • internal/app/app.go: Modified the PrintStats method to include failedEventsTotal in the log output and update the total field with the number of processed events.
  • internal/app/app.go: Enhanced the EventLoop to log the number of failed events and update the CompletedEvent struct with failedCount.
  • internal/app/app.go: Updated the processMessage method to return the count of failed events and handle errors accordingly. [1] [2] [3]

@fadhilyori fadhilyori self-assigned this Feb 26, 2025
@fadhilyori fadhilyori merged commit deaad3f into mata-elang-stable:main Feb 26, 2025
1 check 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.

1 participant