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
Fix/issue 509 #539
Fix/issue 509 #539
Conversation
Codecov Report
@@ Coverage Diff @@
## devel #539 +/- ##
==========================================
+ Coverage 61.80% 62.29% +0.48%
==========================================
Files 21 21
Lines 2312 2339 +27
==========================================
+ Hits 1429 1457 +28
+ Misses 883 882 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I would not have renamed channel
but if you prefer that I am fine with it.
I did it because I was getting some error somewhere, but I do not remember right now what it was. Thank you both for reviewing! |
This PR fixes the connection closed exception we were getting for long-running tasks. When the connection or the channel is closed, we receive an exception from pika. We then handle that exception by creating a new connection and channel and send the message again.
Unfortunately, we cannot know the actual RMQ server state for a connection or channel through their
is_open
oris_closed
methods.Although there is a replication in the messaging code, we avoid the overhead of creating a new connection and channel for every message.