mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-11-20 19:01:52 +08:00
AppContext is built in create_app and owned by the lifespan: startup() is awaited before serving (errors abort boot), and start_tasks() runs as a supervised background task. A generic PeriodicTask/Scheduler replaces the four Thread mixins, with per-tick bodies moved to plain functions in loops.py. The MCP app now takes the context instead of importing the api.program global. Config updates go through reload_settings(), restoring the RSS re-application that was previously commented out. SessionStore adds session expiry and constant-time token comparison, and downloader shutdown() is wired into app shutdown. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014w1Z6Nxy6XTRgkFXqPr9Zh