Add auto memory distillation scheduler (APScheduler)
- scheduler.py: AsyncIOScheduler with three cron jobs
short daily 03:00 (no LLM, always fast)
mid weekly Sun 03:30 (LLM)
long monthly 1st 04:00 (LLM — off by default)
- config.py: AUTO_DISTILL, AUTO_DISTILL_SHORT/MID/LONG .env flags
- main.py: start/stop scheduler in FastAPI lifespan
- routers/distill.py: GET /distill/status — next run times + config
- requirements.txt: apscheduler>=3.10
- HELP.md: updated planned items, added /distill/status to API table
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,10 @@ from routers import chat, google_chat, nextcloud_talk, files, distill
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
import scheduler
|
||||
scheduler.start()
|
||||
yield
|
||||
scheduler.stop()
|
||||
from llm_client import cleanup
|
||||
await cleanup()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user