Incremental llm index update, add scheduled llm index task

This commit is contained in:
shamoon 2025-04-28 10:29:07 -07:00
parent f6a3882199
commit 2481a66544
No known key found for this signature in database
8 changed files with 154 additions and 48 deletions

View file

@ -234,6 +234,20 @@ def _parse_beat_schedule() -> dict:
"expires": 59.0 * 60.0,
},
},
{
"name": "Rebuild LLM index",
"env_key": "PAPERLESS_LLM_INDEX_TASK_CRON",
# Default daily at 02:10
"env_default": "10 2 * * *",
"task": "documents.tasks.llmindex_index",
"options": {
# 1 hour before default schedule sends again
"expires": 23.0 * 60.0 * 60.0,
"kwargs": {
"progress_bar_disable": True,
},
},
},
]
for task in tasks:
# Either get the environment setting or use the default