Open ceremcem opened 10 years ago
Thanks! Not sure I understand this patch, could you use 'diff -u'?
You welcome. Here it is:
ceremcem@cca-erik:/usr/local/lib/python2.7/dist-packages/kombu$ diff -u messaging.py.orig messaging.py
--- messaging.py.orig 2014-08-21 11:55:12.724325610 +0300
+++ messaging.py 2014-08-21 16:04:36.186257202 +0300
@@ -145,7 +145,15 @@
retry_policy = {} if retry_policy is None else retry_policy
routing_key = self.routing_key if routing_key is None else routing_key
compression = self.compression if compression is None else compression
- exchange = exchange or self.exchange
+
+ #cca
+ self.exchange = exchange or self.exchange
+ exchange = self.exchange
+
+ if self._channel:
+ self.revive(self._channel)
+
+ #/cca
if isinstance(exchange, Exchange):
delivery_mode = delivery_mode or exchange.delivery_mode
Hmm. Why would Producer.init have any effect on .publish, when you only specify an exchange for the latter?
Oh, I was confused. I'm sorry.
I don't see that offending line in the tag for this version: https://github.com/celery/kombu/blob/v3.0.21/kombu/messaging.py
As of Kombu '3.0.21', following official example code does not work:
I changed some library code, here is my patch:
The example code is working now.