Explorar o código

maybe_conn_error: Add AttributeError to the list (if connection is None)

Ask Solem %!s(int64=14) %!d(string=hai) anos
pai
achega
d455cd93ae
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      celery/worker/consumer.py

+ 3 - 1
celery/worker/consumer.py

@@ -346,7 +346,9 @@ class Consumer(object):
     def maybe_conn_error(self, fun):
         try:
             fun()
-        except self.connection_errors:
+        except (AttributeError, ) + \
+                self.connection_errors + \
+                self.channel_errors:
             pass
 
     def close_connection(self):