Forráskód Böngészése

revert changes to FAQ

Ask Solem 14 éve
szülő
commit
83f06002d8
1 módosított fájl, 4 hozzáadás és 7 törlés
  1. 4 7
      FAQ

+ 4 - 7
FAQ

@@ -461,16 +461,13 @@ that has an AMQP client.
 How can I get the task id of the current task?
 ----------------------------------------------
 
-**Answer**: Celery does set some default keyword arguments if the task
-accepts them (you can accept them by either using ``**kwargs``, or list them
-specifically)::
+**Answer**: The current id and more is available in the task request::
 
     @task
-    def mytask(task_id=None):
-        cache.set(task_id, "Running")
+    def mytask():
+        cache.set(mytask.request.id, "Running")
 
-The default keyword arguments are documented here:
-http://celeryq.org/docs/userguide/tasks.html#default-keyword-arguments
+For more information see :ref:`task-request-info`.
 
 .. _faq-custom-task-ids: