Files
along_django/scripts/run_celery_broadcast_only.sh

19 lines
443 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/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