禁用除新订单服务号广播外的所有 Celery/Beat 任务,仅保留 dingdan_guangbo

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-06-24 00:57:42 +08:00
parent 49ba67ecaf
commit ef2f30f321
13 changed files with 131 additions and 150 deletions

View File

@@ -0,0 +1,18 @@
#!/bin/bash
# 仅新订单服务号广播 — 唯一允许的 Celery Worker 启动方式
# 严禁同时启动 celery beat 或其它队列 workerdefault/order_tasks/periodic_tasks
set -euo pipefail
cd "$(dirname "$0")/.."
export DJANGO_SETTINGS_MODULE=a_long_dianjing.settings
exec celery -A a_long_dianjing worker \
-l info \
-Q broadcast \
-c 2 \
--hostname=broadcast@%h \
--without-gossip \
--without-mingle \
-Ofair