Selaa lähdekoodia

AMQP Result Backend: Enable auto_delete for the result queues again

Ask Solem 14 vuotta sitten
vanhempi
commit
a08d194b3d
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      celery/backends/amqp.py

+ 2 - 2
celery/backends/amqp.py

@@ -25,7 +25,7 @@ class ResultPublisher(Publisher):
     delivery_mode = conf.RESULT_PERSISTENT and 2 or 1
     serializer = conf.RESULT_SERIALIZER
     durable = conf.RESULT_PERSISTENT
-    auto_delete = False
+    auto_delete = True
 
     def __init__(self, connection, task_id, **kwargs):
         super(ResultPublisher, self).__init__(connection,
@@ -38,7 +38,7 @@ class ResultConsumer(Consumer):
     exchange_type = conf.RESULT_EXCHANGE_TYPE
     durable = conf.RESULT_PERSISTENT
     no_ack = True
-    auto_delete = False
+    auto_delete = True
 
     def __init__(self, connection, task_id, **kwargs):
         routing_key = task_id.replace("-", "")