feat: 核心模块增强 — 加密 + 运行时配置 + 日志缓冲

- crypto.py: API Key 加密/解密工具
- runtime_config.py: 运行时动态配置管理
- log_buffer.py: 内存日志缓冲区
- config.py: 新增加密配置项
- http_client.py: 增强重试和错误处理
This commit is contained in:
shangfangjian
2026-09-19 11:58:03 +08:00
parent b3e2c52b49
commit 786f10aa11
57 changed files with 3178 additions and 488 deletions
+5
View File
@@ -70,6 +70,11 @@ def run_migrations_online() -> None:
with connectable.connect() as connection:
_ensure_version_table(connection)
# SQLAlchemy 2.0 autobegin:上面的探测 SELECT 会留下隐式事务。
# 若不结束,alembic(>=1.16)会判定处于「外部事务」而全程不提交,
# 迁移在连接关闭时被静默回滚(upgrade 退出码仍为 0)。
if connection.in_transaction():
connection.commit()
context.configure(connection=connection, target_metadata=target_metadata)
with context.begin_transaction():