feat(index-cache): add TTL/size eviction task and daily schedule

This commit is contained in:
CREDO23 2026-06-12 16:48:18 +02:00
parent 019aa7bf76
commit 4e4f7f34fa
3 changed files with 84 additions and 0 deletions

View file

@ -193,6 +193,7 @@ celery_app = Celery(
"app.tasks.celery_tasks.auto_reload_task",
"app.tasks.celery_tasks.gateway_tasks",
"app.etl_pipeline.cache.eviction.task",
"app.indexing_pipeline.cache.eviction.task",
"app.automations.tasks.execute_run",
"app.automations.triggers.builtin.schedule.selector",
"app.automations.triggers.builtin.event.selector",
@ -313,6 +314,12 @@ celery_app.conf.beat_schedule = {
"schedule": crontab(hour="4", minute="0"),
"options": {"expires": 600},
},
# Prune the index cache (chunk+embedding sets) once daily, off-peak.
"evict-index-cache": {
"task": "evict_index_cache",
"schedule": crontab(hour="4", minute="30"),
"options": {"expires": 600},
},
# Fire due automation schedule triggers (Beat entry owned by the schedule
# trigger; see app.automations.triggers.builtin.schedule.source).
**SCHEDULE_BEAT_SCHEDULE,