mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-21 11:11:59 +00:00
转发运行事件时跳过不认识的事件种类(回放照样读得到);test-multiprocess.sh 不带参数时 macOS 的 bash 3.2 报 args 未定义,参数直接原样交给 pytest
This commit is contained in:
@@ -159,11 +159,14 @@ class Relay:
|
||||
.order_by(RunEvent.seq))).scalars())
|
||||
last_log = None
|
||||
for row in rows:
|
||||
event = RunEventModel(id=row.id, run_id=run_id, seq=row.seq, type=EventType(row.type),
|
||||
node_id=row.node_id, ts=row.ts, data=row.data or {})
|
||||
await bus.publish(event, relayed=True)
|
||||
self._cursor[run_id] = max(self._cursor.get(run_id, 0), int(row.seq or 0))
|
||||
last_log = row
|
||||
try:
|
||||
event = RunEventModel(id=row.id, run_id=run_id, seq=row.seq, type=EventType(row.type),
|
||||
node_id=row.node_id, ts=row.ts, data=row.data or {})
|
||||
except ValueError:
|
||||
continue # 不认识的事件种类(更新的版本写的):回放时照样读得到,这里不转
|
||||
await bus.publish(event, relayed=True)
|
||||
ended = status is None or status in _TERMINAL or (
|
||||
status == "interrupted" and last_log is not None and last_log.type == EventType.LOG
|
||||
and (last_log.data or {}).get("code") == "server_shutdown")
|
||||
|
||||
Reference in New Issue
Block a user