From 19c66d626105efa5a276240b5dffdeb1ae729d8e Mon Sep 17 00:00:00 2001 From: Nicolas Mota Date: Thu, 10 Aug 2017 08:21:38 -0300 Subject: [PATCH] Fix grammar, PEP8 (#4188) --- celery/app/task.py | 4 ++-- examples/app/myapp.py | 1 + examples/periodic-tasks/myapp.py | 2 ++ examples/tutorial/tasks.py | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/celery/app/task.py b/celery/app/task.py index e0fb1f574e1..c871028bac1 100644 --- a/celery/app/task.py +++ b/celery/app/task.py @@ -132,7 +132,7 @@ def as_execution_options(self): @property def children(self): - # children must be an empy list for every thread + # children must be an empty list for every thread if self._children is None: self._children = [] return self._children @@ -383,7 +383,7 @@ def __call__(self, *args, **kwargs): _task_stack.pop() def __reduce__(self): - # - tasks are pickled into the name of the task only, and the reciever + # - tasks are pickled into the name of the task only, and the receiver # - simply grabs it from the local registry. # - in later versions the module of the task is also included, # - and the receiving side tries to import that module so that diff --git a/examples/app/myapp.py b/examples/app/myapp.py index 2826cad9155..4a0f2077a96 100644 --- a/examples/app/myapp.py +++ b/examples/app/myapp.py @@ -37,5 +37,6 @@ def add(x, y): return x + y + if __name__ == '__main__': app.start() diff --git a/examples/periodic-tasks/myapp.py b/examples/periodic-tasks/myapp.py index 66a7143e546..e52c6515e5a 100644 --- a/examples/periodic-tasks/myapp.py +++ b/examples/periodic-tasks/myapp.py @@ -41,6 +41,7 @@ app.conf.timezone = 'UTC' + @app.task def say(what): print(what) @@ -54,5 +55,6 @@ def setup_periodic_tasks(sender, **kwargs): # See periodic tasks user guide for more examples: # http://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html + if __name__ == '__main__': app.start() diff --git a/examples/tutorial/tasks.py b/examples/tutorial/tasks.py index c13c9ece7cb..6f51bde7376 100644 --- a/examples/tutorial/tasks.py +++ b/examples/tutorial/tasks.py @@ -8,5 +8,6 @@ def add(x, y): return x + y + if __name__ == '__main__': app.start()