auto-sync: 2026-05-16 22:03:14

This commit is contained in:
cfdaily
2026-05-16 22:03:14 +08:00
parent 49790e6fb5
commit ce3fd584ad
+1 -1
View File
@@ -789,7 +789,7 @@ async def check_inbox():
if not INBOX_PATH.exists():
return
lines = INBOX_PATH.read_text().strip().split('\n')
INBOX_PATH.unlink() # 原子读取+删除(参考 agent-chorus --clear 模式)
INBOX_PATH.write_text('') # truncate:清空内容不删除文件,避免并发追加写入时文件不存在
for line in lines:
msg = json.loads(line)
await handle_event(msg['event'], msg['task_id'], msg['from'])