fix: prestart.sh uses get_session_factory instead of non-existent async_session_factory

This commit is contained in:
Agent Zero
2026-08-21 02:29:45 +02:00
parent 4fe3b2365b
commit eaa4000429
+3 -2
View File
@@ -111,14 +111,15 @@ echo "[prestart] Auto-installing and activating discovered plugins..."
python3 -c "
import asyncio
from app.plugins.registry import get_registry
from app.core.db import async_session_factory
from app.core.db import get_session_factory
from sqlalchemy import select
from app.models.plugin import Plugin as PluginModel
async def auto_activate_plugins():
r = get_registry()
discovered = r.discover_builtins()
async with async_session_factory() as db:
factory = get_session_factory()
async with factory() as db:
for name in discovered:
result = await db.execute(select(PluginModel).where(PluginModel.name == name))
record = result.scalar_one_or_none()