优化浏览器池和并发配置

1. 浏览器池改为按需启动模式
   - 启动时不创建浏览器,有截图任务时才启动
   - 空闲5分钟后自动关闭浏览器释放资源

2. 修复截图并发数保存问题
   - 修复database.py中缺少保存max_screenshot_concurrent的代码

3. 去掉并发数上限限制
   - 管理员可自由设置并发数,不再限制1-20/1-5

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-10 20:31:49 +08:00
parent 7954aeaf59
commit 32a29e61e9
4 changed files with 43 additions and 36 deletions

View File

@@ -1013,6 +1013,10 @@ def update_system_config(max_concurrent=None, schedule_enabled=None, schedule_ti
updates.append('max_concurrent_per_account = ?')
params.append(max_concurrent_per_account)
if max_screenshot_concurrent is not None:
updates.append('max_screenshot_concurrent = ?')
params.append(max_screenshot_concurrent)
if schedule_weekdays is not None:
updates.append('schedule_weekdays = ?')
params.append(schedule_weekdays)