auto-sync: 2026-05-16 22:03:14
This commit is contained in:
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user