Files
Melora/app
Claude dbaa7b0d8b Replace lifespan with on_event handlers for older FastAPI compat
The lifespan constructor parameter was added in FastAPI 0.93. When
running outside Docker with an older system-packaged FastAPI, the
parameter is silently ignored — the app starts and serves routes but
init_db() and start_presence() never run, so the bot never goes online
and webhooks crash with "Database not initialised".

on_event("startup")/on_event("shutdown") work across all FastAPI
versions.

https://claude.ai/code/session_019ANRdyL2jfi7ysWhqN4PfD
2026-02-28 09:24:02 +00:00
..