Files
zsglpt/services/tasks.py
yuyx 10be464265 fix: 修复连接池计数和任务调度器默认值问题
1. db_pool.py - 修复连接计数不一致问题
   - 将 _created_connections 递增移到 put() 成功之后
   - 确保 Full 异常和创建异常时正确关闭连接
   - 避免计数器永久偏高

2. services/tasks.py - 统一 _running_by_user 默认值
   - 将减少计数时的默认值从 1 改为 0
   - 与增加计数时的默认值保持一致
   - 添加注释说明

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 22:46:40 +08:00

40 KiB