修复celery时区问题

Signed-off-by: 木子-李 <1537080775@qq.com>
This commit is contained in:
木子-李
2024-08-01 14:05:49 +00:00
committed by Gitee
parent c8e235bed6
commit 5cf2eef7ad
2 changed files with 6 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ else:
from celery import Celery
app = Celery(f"application")
app.config_from_object('django.conf:settings')
app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
platforms.C_FORCE_ROOT = True