Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

amqp/cassandra/mongodb backends now set result.children

  • Loading branch information...
commit 6d64d7a24f15311a0bd13baf7f6a9879176d2d08 1 parent 8fd82db
@ask authored
View
3  celery/backends/amqp.py
@@ -118,7 +118,8 @@ def errback(error, delay):
interval_max=interval_max)
send(conn, task_id, {"task_id": task_id, "status": status,
"result": self.encode_result(result, status),
- "traceback": traceback})
+ "traceback": traceback,
+ "children": self.current_task_children()})
return result
def get_task_meta(self, task_id, cache=True):
View
4 celery/backends/cassandra.py
@@ -131,7 +131,8 @@ def _do_store():
date_done = self.app.now()
meta = {"status": status,
"date_done": date_done.strftime('%Y-%m-%dT%H:%M:%SZ'),
- "traceback": self.encode(traceback)}
+ "traceback": self.encode(traceback),
+ "children": self.encode(self.current_task_children())}
if self.detailed_mode:
meta["result"] = result
cf.insert(task_id, {date_done: self.encode(meta)},
@@ -161,6 +162,7 @@ def _do_get():
"result": self.decode(obj["result"]),
"date_done": obj["date_done"],
"traceback": self.decode(obj["traceback"]),
+ "children": self.decode(obj["children"]),
}
except (KeyError, pycassa.NotFoundException):
meta = {"status": states.PENDING, "result": None}
View
4 celery/backends/mongodb.py
@@ -107,7 +107,8 @@ def _store_result(self, task_id, result, status, traceback=None):
"status": status,
"result": Binary(self.encode(result)),
"date_done": datetime.utcnow(),
- "traceback": Binary(self.encode(traceback))}
+ "traceback": Binary(self.encode(traceback)),
+ "children": Binary(self.encode(self.current_task_children()))}
self.collection.save(meta, safe=True)
return result
@@ -125,6 +126,7 @@ def _get_task_meta_for(self, task_id):
"result": self.decode(obj["result"]),
"date_done": obj["date_done"],
"traceback": self.decode(obj["traceback"]),
+ "children": self.decode(obj["children"]),
}
return meta
View
2  celery/bin/celeryd.py
@@ -12,7 +12,7 @@
Number of child processes processing the queue. The default
is the number of CPUs available on your system.
-.. cmdoption:: -c, --pool
+.. cmdoption:: -P, --pool
Pool implementation:
Please sign in to comment.
Something went wrong with that request. Please try again.