Explorar o código

Headers must always be a dict for before_task_publish

Ask Solem %!s(int64=11) %!d(string=hai) anos
pai
achega
35b214e109
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      celery/app/amqp.py

+ 1 - 0
celery/app/amqp.py

@@ -221,6 +221,7 @@ class TaskProducer(Producer):
                      **kwargs):
         """Send task message."""
         retry = self.retry if retry is None else retry
+        headers = {} if headers is None else headers
 
         qname = queue
         if queue is None and exchange is None: