21 Commits
Author SHA1 Message Date
geek_michaelandClaude Opus 4.7 e0bd7fd069 fix: prevent event loop blocking and add queue task timeout
Two related fixes for server unresponsiveness:

1. apis/message_task.py: test_message_task is an async endpoint that
   called web_hook() synchronously. If the webhook request hangs, this
   blocks the entire uvicorn event loop, freezing all HTTP responses.
   Changed to await asyncio.to_thread() so the blocking call runs in a
   thread pool without stalling the event loop.

2. core/queue/queue.py: the queue worker thread executes tasks with no
   timeout. A single hung task blocks all subsequent tasks permanently.
   Wrapped task execution in ThreadPoolExecutor with a 600s timeout,
   so the worker can recover and process remaining tasks.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 21:29:51 +08:00
Tanshin Pan 379b730e96 feat(core): 添加数据库会话管理和Redis队列优化
- 在article API中添加session关闭确保资源释放
- 为Db类的所有数据库操作方法添加session管理的finally块
- 修复add_article方法中的异常处理逻辑,确保回滚时session存在
- 优化TaskQueueManager中的Redis存储策略,从全量重写改为增量追加
- 统一所有数据库查询方法使用相同的session管理模式
2026-05-18 10:17:43 +08:00
RachelOS 0d3efa5bab 1.5.2-修复添加任务时死锁问题 2026-04-16 15:01:03 +08:00
RachelOS a61badfeb1 1.5.0-Fix 2026-04-03 02:07:18 +08:00
RachelOS 11224e4544 1.5.0-Fix 2026-04-02 23:23:25 +08:00
RachelOS 6c2be7584c 1.5.0-Fix 2026-04-02 17:21:25 +08:00
RachelOS 393e6bd09b 1.5.0-Fix 2026-04-02 00:50:43 +08:00
RachelOS fde68b7e22 1.5.0-Fix 2026-04-02 00:33:25 +08:00
RachelOS 93ea1be088 1.5.0-Fix 2026-04-02 00:24:30 +08:00
RachelOS ba7bc1d99a 1.5.0-Fix 2026-04-01 23:56:02 +08:00
RachelOS 5e9e626021 1.5.0-Fix 2026-04-01 22:37:41 +08:00
RachelOS 7eaaa5fc30 1.4.9-Fix 2026-03-27 20:31:44 +08:00
RachelOS 14d692cd29 Fix 2025-11-24 21:25:32 +08:00
RachelOs f151d1e3fd 1.4.7 1.4.7 2025-11-04 00:36:51 +08:00
t@123654 9de9b77fb4 1.4.5 优化授权超时时无效调用 2025-08-15 16:37:13 +08:00
t@123654 199c3a66f3 1.4.4 增加任务消息测试功能 2025-08-06 12:09:49 +08:00
t@123654 e41b01d824 1.4.2 1.4.2 2025-06-27 14:51:05 +08:00
t@123654 c8c4f15b39 1.4.1 2025-06-09 18:58:00 +08:00
t@123654 e112b246b1 1.3.9-修复增加用户缓存后,修改密码无效问题 2025-06-08 12:32:28 +08:00
t@123654 618360f601 1.3.8 2025-06-05 14:08:11 +08:00
t@123654 375e21160f 1.3.7 2025-06-03 11:35:39 +08:00