mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-09-21 13:12:24 +00:00
Update celery related docker container independence (#943)
* Update celery related docker container independence * Fix lint * Fix nginx conf
This commit is contained in:
@@ -16,8 +16,7 @@
|
||||
如果你想对任务进行目录层级划分,使任务结构更加清晰,你可以新建任意目录,但必须注意的是
|
||||
|
||||
1. 在 `backend/app/task/tasks` 目录下新建 python 包目录
|
||||
2. 新建目录后,务必更新 `conf.py` 配置中的 `CELERY_TASKS_PACKAGES`,将新建目录模块路径添加到此列表
|
||||
3. 在新建目录下,务必添加 `tasks.py` 文件,并在此文件中编写相关任务代码
|
||||
2. 在新建目录下,务必添加 `tasks.py` 文件,并在此文件中编写相关任务代码
|
||||
|
||||
## 消息代理
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# work && beat
|
||||
celery -A backend.app.task.celery worker -l info -P gevent -c 100 &
|
||||
|
||||
# beat
|
||||
celery -A backend.app.task.celery beat -l info &
|
||||
|
||||
# flower
|
||||
celery -A backend.app.task.celery flower --port=8555 --basic-auth=admin:123456
|
||||
Reference in New Issue
Block a user