Browse Source

Change variable name calc -> predicate

Ask Solem 15 years ago
parent
commit
0cea91e322
2 changed files with 4 additions and 4 deletions
  1. 2 2
      celery/task/base.py
  2. 2 2
      docs/userguide/routing.rst

+ 2 - 2
celery/task/base.py

@@ -705,7 +705,7 @@ class PeriodicTask(Task):
                       5: lambda x: x / 60}
                       5: lambda x: x / 60}
         args = dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second
         args = dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second
         r = None
         r = None
-        for res, calc in resolution.items():
-            if calc(self.timedelta_seconds(delta)):
+        for res, predicate in resolution.items():
+            if predicate(self.timedelta_seconds(delta)):
                 r = res
                 r = res
         return datetime(*args[:r])
         return datetime(*args[:r])

+ 2 - 2
docs/userguide/routing.rst

@@ -19,7 +19,7 @@ the content type of the message and its content encoding. In Celery the
 content type is usually the serialization format used to serialize the
 content type is usually the serialization format used to serialize the
 message, and the body contains the name of the task to execute, the
 message, and the body contains the name of the task to execute, the
 task id (UUID), the arguments to execute it with and some additional
 task id (UUID), the arguments to execute it with and some additional
-metadata - like the number of retries and its ETA if any.
+metadata - like the number of retries and its ETA (if any).
 
 
 This is an example task message represented as a Python dictionary:
 This is an example task message represented as a Python dictionary:
 
 
@@ -136,7 +136,7 @@ Declares an exchange by name.
   are no more queues using it.
   are no more queues using it.
 
 
 queue.declare(queue_name, passive, durable, exclusive, auto_delete)
 queue.declare(queue_name, passive, durable, exclusive, auto_delete)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 Declares a queue by name.
 Declares a queue by name.