feat(settings): 添加Celery Redis配置

添加CELERY_BROKER_URL和CELERY_RESULT_BACKEND配置,用于连接Redis作为Celery的消息代理和结果存储
This commit is contained in:
2026-01-17 17:50:29 +08:00
parent 0671bb8a8c
commit 27a87436ce

View File

@@ -181,3 +181,6 @@ REPORTS_ROOT = BASE_DIR / 'reports' # 可以修改为其他路径
# Django settings.py 中追加 Celery 日志配置 # Django settings.py 中追加 Celery 日志配置
CELERY_LOG_FILE = "/var/log/celery/worker.log" # 你的指定日志路径 CELERY_LOG_FILE = "/var/log/celery/worker.log" # 你的指定日志路径
CELERY_LOG_LEVEL = "INFO" # 日志级别 CELERY_LOG_LEVEL = "INFO" # 日志级别
CELERY_BROKER_URL = 'redis://:xjjq1234!@localhost:6379/0'
CELERY_RESULT_BACKEND = 'redis://:xjjq1234!@localhost:6379/0'