Use celery.start() instead of celery.celery_main()
This commit is contained in:
Родитель
e9d554f689
Коммит
554931f9a2
|
@ -110,7 +110,7 @@ class App(base.BaseApp):
|
|||
return instantiate("celery.task.sets:TaskSet",
|
||||
app=self, *args, **kwargs)
|
||||
|
||||
def celery_main(self, argv=None):
|
||||
def start(self, argv=None):
|
||||
"""Run :program:`celery` using `argv`. Uses :data:`sys.argv`
|
||||
if `argv` is not specified."""
|
||||
return instantiate("celery.bin.celery:CeleryCommand", app=self) \
|
||||
|
|
|
@ -69,7 +69,7 @@ Let's create the file :file:`tasks.py`:
|
|||
return x + y
|
||||
|
||||
if __name__ == "__main__":
|
||||
celery.celery_main()
|
||||
celery.start()
|
||||
|
||||
The first argument to :class:`Celery` is the name of the current module,
|
||||
this is needed to that names can be automatically generated, the second
|
||||
|
|
|
@ -9,4 +9,4 @@ def add(x, y):
|
|||
return x + y
|
||||
|
||||
if __name__ == "__main__":
|
||||
celery.celery_main()
|
||||
celery.start()
|
||||
|
|
Загрузка…
Ссылка в новой задаче