Browse Source

Bool fail in apply_asyncs immediate, priorty and mandatory

Ask Solem 15 years ago
parent
commit
3d67cb5c6f
2 changed files with 9 additions and 6 deletions
  1. 3 3
      Changelog
  2. 6 3
      celery/execute.py

+ 3 - 3
Changelog

@@ -19,7 +19,9 @@ Change history
 	be sure to initialize tables (django: ``syncdb``, python: ``celeryinit``).
 	(Note: This is only the case when using Django 1.1 or higher)
 
-* Celery now depends on ``carrot`` version 0.6.0.
+* Now depends on ``carrot`` version 0.6.0.
+
+* Now depends on python-daemon 1.4.8
 
 **IMPORTANT CHANGES**
 
@@ -89,8 +91,6 @@ Change history
 	which resulted in the ``[Errno 10] No child processes`` problem when
 	detaching.
 
-* Now depends on python-daemon 1.4.8
-
 * Fixed a possible DjangoUnicodeDecodeError being raised when saving pickled
 	data to Django's memcached cache backend.
 

+ 6 - 3
celery/execute.py

@@ -73,9 +73,12 @@ def apply_async(task, args=None, kwargs=None, countdown=None, eta=None,
     kwargs = kwargs or {}
     routing_key = routing_key or getattr(task, "routing_key", None)
     exchange = exchange or getattr(task, "exchange", None)
-    immediate = immediate or getattr(task, "immediate", None)
-    mandatory = mandatory or getattr(task, "mandatory", None)
-    priority = priority or getattr(task, "priority", None)
+    if immediate is None:
+        immediate = immediate or getattr(task, "immediate", None)
+    if mandatory is None:
+        mandatory = getattr(task, "mandatory", None)
+    if priority is None:
+        priority = getattr(task, "priority", None)
     serializer = serializer or getattr(task, "serializer", None)
     taskset_id = opts.get("taskset_id")
     publisher = opts.get("publisher")