瀏覽代碼

Revert countdown/eta

Ask Solem 16 年之前
父節點
當前提交
ce47d7f9d4
共有 2 個文件被更改,包括 2 次插入14 次删除
  1. 2 10
      celery/execute.py
  2. 0 4
      celery/messaging.py

+ 2 - 10
celery/execute.py

@@ -7,8 +7,7 @@ from functools import partial as curry
 
 def apply_async(task, args=None, kwargs=None, routing_key=None,
         immediate=None, mandatory=None, connection=None,
-        connect_timeout=AMQP_CONNECTION_TIMEOUT, priority=None,
-        eta=None, countdown=None, **opts):
+        connect_timeout=AMQP_CONNECTION_TIMEOUT, priority=None, **opts):
     """Run a task asynchronously by the celery daemon(s).
 
     :param task: The task to run (a callable object, or a :class:`Task`
@@ -18,12 +17,6 @@ def apply_async(task, args=None, kwargs=None, routing_key=None,
 
     :param kwargs: The keyword arguments to pass on to the task (a ``dict``)
 
-    :keyword countdown:  Number of seconds in the future that the task
-        should execute.
-
-    :keyword eta: The task won't be run before this date
-        (a :class:`datetime.datetime` object).
-
     :keyword routing_key: The routing key used to route the task to a worker
         server.
 
@@ -64,8 +57,7 @@ def apply_async(task, args=None, kwargs=None, routing_key=None,
         
     task_id = delay_task(task.name, args, kwargs,
                          routing_key=routing_key, mandatory=mandatory,
-                         immediate=immediate, priority=priority,
-                         countdown=countdown, eta=eta)
+                         immediate=immediate, priority=priority)
 
     if need_to_close_connection:
         publisher.close()

+ 0 - 4
celery/messaging.py

@@ -42,8 +42,6 @@ class TaskPublisher(Publisher):
     def _delay_task(self, task_name, task_id=None, part_of_set=None,
             task_args=None, task_kwargs=None, **kwargs):
         """INTERNAL"""
-        eta = kwargs.get("eta")
-        countdown = kwargs.get("countdown")
         priority = kwargs.get("priority")
         immediate = kwargs.get("immediate")
         mandatory = kwargs.get("mandatory")
@@ -57,8 +55,6 @@ class TaskPublisher(Publisher):
             "task": task_name,
             "args": task_args,
             "kwargs": task_kwargs,
-            "countdown": countdown,
-            "eta": eta,
         }
         if part_of_set:
             message_data["taskset"] = part_of_set