Add optional AI generation, MQTT, OAuth refresh and calendar recurrence

This commit is contained in:
Pigway
2026-10-08 23:44:07 +08:00
parent 69a0841868
commit 8209aadbb8
24 changed files with 1113 additions and 37 deletions
+4
View File
@@ -110,7 +110,9 @@ def create_app(settings=None, start_worker=True):
async def lifespan(app):
if start_worker:
scheduler.start()
app.state.mqtt.start()
yield
app.state.mqtt.stop()
scheduler.stop()
db.close()
@@ -128,6 +130,7 @@ def create_app(settings=None, start_worker=True):
install_extensions(app, service)
install_accounts(app, db)
app.state.service = service
app.state.worker_enabled = start_worker
app.state.scheduler = scheduler
app.add_middleware(
CORSMiddleware,
@@ -1262,6 +1265,7 @@ def create_app(settings=None, start_worker=True):
if filename not in [
"app.js",
"features.js",
"extensions.js",
"style.css",
"i18n.js",
"swagger-ui-bundle.js",