debug: add startup print statements for plugin activation
This commit is contained in:
@@ -156,8 +156,11 @@ async def lifespan(app: FastAPI):
|
|||||||
router = getattr(router_module, route_def.router_attr)
|
router = getattr(router_module, route_def.router_attr)
|
||||||
app.include_router(router)
|
app.include_router(router)
|
||||||
plugin_record.active = True
|
plugin_record.active = True
|
||||||
|
plugin_record.status = "active"
|
||||||
|
print(f"[STARTUP] Activated plugin: {name} ({len(plugin.manifest.routes)} routes)", flush=True)
|
||||||
logger.info(f"Activated plugin: {name} ({len(plugin.manifest.routes)} routes)")
|
logger.info(f"Activated plugin: {name} ({len(plugin.manifest.routes)} routes)")
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
print(f"[STARTUP] Failed to activate plugin {name}: {exc}", flush=True)
|
||||||
logger.warning(f"Failed to activate plugin {name}: {exc}")
|
logger.warning(f"Failed to activate plugin {name}: {exc}")
|
||||||
|
|
||||||
await db.commit()
|
await db.commit()
|
||||||
|
|||||||
@@ -68,8 +68,10 @@ class AIAssistantPlugin(BasePlugin):
|
|||||||
|
|
||||||
self._ai_handler = AIParticipantHandler(service_container)
|
self._ai_handler = AIParticipantHandler(service_container)
|
||||||
get_participant_registry().register("ai", self._ai_handler)
|
get_participant_registry().register("ai", self._ai_handler)
|
||||||
|
print("[STARTUP] AI Assistant registered as participant 'ai'", flush=True)
|
||||||
logger.info("AI Assistant registered as participant 'ai'")
|
logger.info("AI Assistant registered as participant 'ai'")
|
||||||
except Exception:
|
except Exception as e:
|
||||||
|
print(f"[STARTUP] Failed to register AI Assistant as participant: {e}", flush=True)
|
||||||
logger.exception("Failed to register AI Assistant as participant")
|
logger.exception("Failed to register AI Assistant as participant")
|
||||||
|
|
||||||
# Subscribe to message.received events
|
# Subscribe to message.received events
|
||||||
|
|||||||
Reference in New Issue
Block a user