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

Remove errors logs at shutdown #190

Merged
merged 2 commits into from
May 28, 2024
Merged

Remove errors logs at shutdown #190

merged 2 commits into from
May 28, 2024

Conversation

mbusi
Copy link
Contributor

@mbusi mbusi commented May 20, 2024

To remove annoying error logs at shutdown we added a Amqpx.DirectConsumer module to implement the :amqp_gen_consumer behaviour reusing (through defdelegate) all :amqp_direct_consumer code except for the handle_info function where we added two pattern matches to handle the :shutdown exit reasons as normal, expected occurrences.
We tested the solution running the test/gen_test.exs suite and those pesky error logs disappeared; being certain of anything is quite hard with this lib though cause tests, in general, are pretty flaky.
We may want to test the implementation in a non critical project of ours before creating a new release

Copy link
Member

@francescopellegrini francescopellegrini left a comment

Choose a reason for hiding this comment

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

🚀

@mbusi mbusi marked this pull request as ready for review May 21, 2024 08:20
@mbusi mbusi requested a review from a team as a code owner May 21, 2024 08:20
@succoDiPompelmo
Copy link

Deployed the branch on Pradesh and seems to be working fine in production. I also did kill some pods in staging and no errors show up in the logs anymore.

@mbusi mbusi merged commit bcccad5 into master May 28, 2024
3 checks passed
@mbusi mbusi deleted the fix_shutdown branch May 28, 2024 13:29
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.

4 participants