【发布时间】:2018-12-25 20:24:33
【问题描述】:
来自 celery 帮助功能:
> celery worker -h
...
Embedded Beat Options:
-B, --beat Also run the celery beat periodic task scheduler. Please note that there must only be
one instance of this service. .. note:: -B is meant to be used for development
purposes. For production environment, you need to start celery beat separately.
这也出现在the docs。
您还可以通过启用 workers -B 来将 beat 嵌入到 worker 中 选项,如果你永远不会运行超过一个工人,这很方便 节点,但它不常用,因此不推荐 用于生产:
celery -A proj worker -B
但实际上并没有解释为什么在生产中使用它是“不好的”。希望得到一些见解。
【问题讨论】:
标签: celery celerybeat