-
-
Notifications
You must be signed in to change notification settings - Fork 930
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
Return empty list instead of InconsistencyError when exchange table is empty #1404
Conversation
dc5dd2e
to
9e75a1a
Compare
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.
the fix look good to me but the non pypy integration test failed for some reason.
The pypy integration test is failing a long time. Not sure why. |
yeah but im talking about other integrations tests. the tools that run CI needs some minor tweaks. like pypy should be pypy-3.7 etc. I have to check docs and try to fix them this week |
The other int. tests were canceled since the one failed. The failing one ideally should be fixed but I dont have time for that right now. |
yeah the CI can use pypy more then 3.6 thats the issue |
…s empty Missing redis key containg set of queues bound to queue is caused by removal all queues from the exchange. Hence, we should not raise an exception but just return empty list of queues instead. This commit fixes e.g. case publishing message against empty exchange: import kombu conn = kombu.Connection('redis://') exchange = kombu.Exchange('name', type='direct') exchange.declare(channel=conn.default_channel) producer = conn.Producer() producer.publish( {'hello': 'world'}, exchange=exchange, routing_key='queue1' ) But it also fixes the case when last queue is unbound from exchange and after publishing to this exchange: import kombu conn = kombu.Connection('redis://') exchange = kombu.Exchange('name', type='direct') queue1 = kombu.Queue('queue1', exchange=exchange, routing_key='queue1') exchange.declare(channel=conn.default_channel) queue1 = queue1.bind(channel=conn.default_channel) queue1.declare() producer = conn.Producer() producer.publish( {'hello': 'world'}, exchange=exchange, routing_key='queue1' ) queue1.delete() producer.publish( {'hello': 'world'}, exchange=exchange, routing_key='queue1' )
9e75a1a
to
c1bb06f
Compare
Missing redis key containg set of queues bound to queue is caused
by removal all queues from the exchange. Hence, we should not raise an
exception but just return empty list of queues instead. This commit
fixes e.g. case publishing message against empty exchange:
But it also fixes the case when last queue is unbound from exchange and
after publishing to this exchange:
Fixes #1063