From ab37702ee4ec00b6579654742f5af39ac024b406 Mon Sep 17 00:00:00 2001 From: lewis_yan Date: Thu, 2 Apr 2026 10:45:41 +0800 Subject: [PATCH] feat(celery): register check-quote-deadline-expired beat schedule --- backend/application/settings.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/application/settings.py b/backend/application/settings.py index 004452a..454c759 100644 --- a/backend/application/settings.py +++ b/backend/application/settings.py @@ -386,7 +386,17 @@ API_MODEL_MAP = { } DJANGO_CELERY_BEAT_TZ_AWARE = False +from celery.schedules import crontab + CELERY_TIMEZONE = "Asia/Shanghai" # celery 时区问题 + +CELERY_BEAT_SCHEDULE = { + "check-quote-deadline-expired": { + "task": "apps.pisadmin.miscprocurement.tasks.check_quote_deadline_expired", + "schedule": crontab(minute="*/5"), # 每5分钟 + }, +} + # 静态页面压缩 STATICFILES_STORAGE = "whitenoise.storage.CompressedStaticFilesStorage"