fix: 修复数据库初始化函数调用参数
- check_and_migrate_database不需要database_config参数 - 函数会自动从全局配置获取引擎 - 修复'DatabaseConfig' object has no attribute 'connect'错误
This commit is contained in:
2
bot.py
2
bot.py
@@ -289,7 +289,7 @@ class DatabaseManager:
|
||||
start_time = time.time()
|
||||
|
||||
# 使用线程执行器运行潜在的阻塞操作
|
||||
await initialize_sql_database( global_config.database)
|
||||
await initialize_sql_database()
|
||||
elapsed_time = time.time() - start_time
|
||||
logger.info(
|
||||
f"数据库连接初始化成功,使用 {global_config.database.database_type} 数据库,耗时: {elapsed_time:.2f}秒"
|
||||
|
||||
Reference in New Issue
Block a user