fix: 修复代理问题

This commit is contained in:
丹尼尔
2026-03-15 17:16:05 +08:00
parent 8b62c445fc
commit 15c9e1772a
100 changed files with 6157 additions and 69 deletions

View File

@@ -361,6 +361,19 @@ def update_push_task_status(task_id: str, status: str) -> Optional[Dict]:
# ---------- 同步消息 ----------
def list_all_keys() -> List[str]:
"""返回所有出现过的 keysync_messages + ai_reply_config 去重),用于启动时批量注册回调等。"""
with _LOCK:
conn = _conn()
try:
cur = conn.execute(
"SELECT DISTINCT key FROM (SELECT key FROM sync_messages UNION SELECT key FROM ai_reply_config)"
)
return [r[0] for r in cur.fetchall() if r[0]]
finally:
conn.close()
def append_sync_messages(key: str, messages: List[Dict], max_per_key: int = 500) -> None:
with _LOCK:
conn = _conn()