Przeglądaj źródła

Merge branch 'master' into synack

Ask Solem 12 lat temu
rodzic
commit
8ff7177a43
2 zmienionych plików z 5 dodań i 5 usunięć
  1. 3 3
      celery/backends/mongodb.py
  2. 2 2
      celery/canvas.py

+ 3 - 3
celery/backends/mongodb.py

@@ -128,7 +128,7 @@ class MongoBackend(BaseBackend):
                 'date_done': datetime.utcnow(),
                 'traceback': Binary(self.encode(traceback)),
                 'children': Binary(self.encode(self.current_task_children()))}
-        self.collection.save(meta, safe=True)
+        self.collection.save(meta)
 
         return result
 
@@ -155,7 +155,7 @@ class MongoBackend(BaseBackend):
         meta = {'_id': group_id,
                 'result': Binary(self.encode(result)),
                 'date_done': datetime.utcnow()}
-        self.collection.save(meta, safe=True)
+        self.collection.save(meta)
 
         return result
 
@@ -187,7 +187,7 @@ class MongoBackend(BaseBackend):
         # By using safe=True, this will wait until it receives a response from
         # the server.  Likewise, it will raise an OperationsError if the
         # response was unable to be completed.
-        self.collection.remove({'_id': task_id}, safe=True)
+        self.collection.remove({'_id': task_id})
 
     def cleanup(self):
         """Delete expired metadata."""

+ 2 - 2
celery/canvas.py

@@ -298,7 +298,7 @@ class chain(Signature):
         tasks = d['kwargs']['tasks']
         if d['args'] and tasks:
             # partial args passed on to first task in chain (Issue #1057).
-            tasks[0]['args'] = d['args'] + tasks[0]['args']
+            tasks[0]['args'] = tasks[0]._merge(d['args'])[0]
         return chain(*d['kwargs']['tasks'], **kwdict(d['options']))
 
     @property
@@ -409,7 +409,7 @@ class group(Signature):
         if d['args'] and tasks:
             # partial args passed on to all tasks in the group (Issue #1057).
             for task in tasks:
-                task['args'] = d['args'] + task['args']
+                task['args'] = task._merge(d['args'])[0]
         return group(tasks, **kwdict(d['options']))
 
     def __call__(self, *partial_args, **options):