From 8384c2531996eae9aefdb365e68041e2f7e6a447 Mon Sep 17 00:00:00 2001 From: --git_token Date: Fri, 24 Apr 2026 10:52:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A3=9E=E4=B9=A6?= =?UTF-8?q?=E7=BE=A4=E6=B6=88=E6=81=AF=E5=90=8C=E6=AD=A5=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=9C=AA=E8=AE=B0=E5=BD=95=20quote=5Fmessage=5Fid=20=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:crontab 实际运行的是旧脚本 scripts/sync_lark_group_to_mysql.py, 该脚本 INSERT 语句缺少 quote_message_id/parent_id/root_id 字段。 而 skills/feishu-group-msg-sync/scripts/sync_group_to_mysql.py 已支持 但未被 crontab 正确引用。 修复内容: 1. run_lark_group_sync.sh 改为调用新版脚本 2. 同步状态文件对齐,避免漏消息 3. 移除重复的 crontab 条目,避免双写冲突 4. 回填历史数据(1条消息成功补全引用关系) --- scripts/run_lark_group_sync.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/run_lark_group_sync.sh b/scripts/run_lark_group_sync.sh index d28a268..77bbb7b 100755 --- a/scripts/run_lark_group_sync.sh +++ b/scripts/run_lark_group_sync.sh @@ -2,9 +2,11 @@ # 飞书群消息同步到MySQL - 定时执行脚本 # crontab: 每4小时执行一次 # 0 */4 * * * /root/.openclaw/workspace-xiaokui/scripts/run_lark_group_sync.sh >> /var/log/lark_group_sync.log 2>&1 +# +# 2026-04-24 修复:改用新版脚本(支持 quote_message_id / parent_id / root_id) +# 旧脚本 scripts/sync_lark_group_to_mysql.py 不再使用 export PATH="/root/.nvm/versions/node/v24.14.0/bin:$PATH" -export LARK_SYNC_DB_PASS='xhuBx7d@uT2gUVv' cd /root/.openclaw/workspace-xiaokui -python3 scripts/sync_lark_group_to_mysql.py +python3 skills/feishu-group-msg-sync/scripts/sync_group_to_mysql.py