https://blog.gevent.org/2010/02/27/why-gevent/
https://zhuanlan.zhihu.com/p/420890013
About the --app
argument
The --app
argument specifies the Celery app instance to use, in the form of module.path:attribute
But it also supports a shortcut form. If only a package name is specified, it’ll try to search for the app instance, in the following order:
With --app=proj
:
-
an attribute named
proj.app
, or -
an attribute named
proj.celery
, or -
any attribute in the module
proj
where the value is a Celery application, or
If none of these are found it’ll try a submodule named proj.celery
:
-
an attribute named
proj.celery.app
, or -
an attribute named
proj.celery.celery
, or -
Any attribute in the module
proj.celery
where the value is a Celery application.
This scheme mimics the practices used in the documentation – that is, proj:app
for a single contained module, and proj.celery:app
for larger projects.
网友评论