Files
youpaishidifu c3f0fa0882 feat: 停止信号优先 + DB环形缓冲区 (Task #1617 + #1618)
Task #1617 停止信号优先机制:
- 新增 threading.Event (_stop_event) 作为主停止信号
- 新增 _interruptible_sleep() 包装 Event.wait(timeout)
- 所有关键 time.sleep() 替换为 _interruptible_sleep()
- _poll 检查点同时检测 _stop_event.is_set() 和 _running
- stop()/_emergency_stop() 先 set() 唤醒阻塞线程
- start() 清除残留 stop_event

Task #1618 DB落库修复 + 环形缓冲区:
- user_messages/bot_messages 每平台最多10条 FIFO
- 物理重启时不清空这两张表(仅清空 ocr_staging/keyword_scores)
- 新增 SQLite 临时文件到 .gitignore

其他:
- 删除 _ocr_blue_test.py / _ocr_crop_test.py 调试文件
2026-08-29 13:17:58 +08:00

80 lines
1.3 KiB
Plaintext

# Python
__pycache__/
*.pyc
*.pyo
*.egg-info/
dist/
# PyInstaller output (在build目录内),但保留构建脚本
build/build/
build/*.log
build/cert_info.txt
build/code_signing_cert.*
build/windowmsgbot/
# Virtual environment
venv/
.venv/
.venv311/
env/
# IDE
.vscode/
.idea/
# Config (keep template but ignore local)
config.json
local_config.json
# User data
知识库/
.knowledge_base/
# Debug dumps
.debug/
tim_dump.txt
# OCR debug screenshots
ocr_debug_*.png
wechat_ocr_*.png
# OCR 调试图片分目录(img/raw 原图 + img/processed 处理后)
img/
# Shell redirect artifacts
nul
worker_stderr.txt
worker_stdout.txt
# Logs
*.log
# OS
Thumbs.db
.DS_Store
# 用户消息数据库(含聊天记录,禁止入库)
msg_history.db
# 诊断脚本/报告(临时调试文件)
# ⚠ 必须同时覆盖带下划线(v1)与无下划线(v2)两种命名——曾有 debug_kb.py/test_kb.py
# 因无下划线前缀绕过 _debug_*_/ _test_*_ 规则,存活在 git status 待提交区
_diag_*.py
_diagnosis_*.py
_debug_*.py
debug_*.py
_debug_*.txt
debug_*.txt
_diag_*.txt
_test_*.py
test_*.py
_test_*.txt
test_*.txt
_radical_*.txt
unicode_radicals.md.bak
easyocr_worker_state.json
easyocr_worker_state.json
# SQLite temp files
msg_history.db-shm
msg_history.db-wal