fix 调整数据库会话 #330

This commit is contained in:
jxxghp
2023-09-02 08:18:01 +08:00
parent ec8c9c996a
commit 374e633ca7
5 changed files with 18 additions and 16 deletions

View File

@ -5,7 +5,7 @@ from typing import Any, List, Dict, Tuple
from app.chain import ChainBase
from app.core.config import settings
from app.core.event import EventManager
from app.db import GlobalDB
from app.db import ScopedSession
from app.db.models import Base
from app.db.plugindata_oper import PluginDataOper
from app.db.systemconfig_oper import SystemConfigOper
@ -37,7 +37,7 @@ class _PluginBase(metaclass=ABCMeta):
def __init__(self):
# 数据库连接
self.db = GlobalDB
self.db = ScopedSession()
# 插件数据
self.plugindata = PluginDataOper(self.db)
# 处理链