mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
feat(auto-upgrade): celery scheduled task
This commit is contained in:
@ -72,6 +72,7 @@ def init_app(app: DifyApp) -> Celery:
|
||||
"schedule.clean_messages",
|
||||
"schedule.mail_clean_document_notify_task",
|
||||
"schedule.queue_monitor_task",
|
||||
"schedule.check_upgradable_plugin_task",
|
||||
]
|
||||
day = dify_config.CELERY_BEAT_SCHEDULER_TIME
|
||||
beat_schedule = {
|
||||
@ -106,6 +107,11 @@ def init_app(app: DifyApp) -> Celery:
|
||||
minutes=dify_config.QUEUE_MONITOR_INTERVAL if dify_config.QUEUE_MONITOR_INTERVAL else 30
|
||||
),
|
||||
},
|
||||
# every 15 minutes
|
||||
"check_upgradable_plugin_task": {
|
||||
"task": "schedule.check_upgradable_plugin_task.check_upgradable_plugin_task",
|
||||
"schedule": timedelta(minutes=15),
|
||||
},
|
||||
}
|
||||
celery_app.conf.update(beat_schedule=beat_schedule, imports=imports)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user