PEP-248: вачдог перепроверяет пропавшую сессию tmux перед перезапуском (нестабильный cjm hang под нагрузкой CI)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5271a29237
commit
d852aed15b
@ -243,7 +243,8 @@ async function checkSession(db: Db, s: SessionView, opts: WatchdogOptions, cfg:
|
||||
}
|
||||
const label = `#${s.id} ${s.taskKey ?? ""} (${s.tmuxName})`;
|
||||
|
||||
if (!(await tmux.hasSession(tmux.sessionPane(s)))) {
|
||||
// One failed `has-session` under load is not proof: ask again before restarting the agent.
|
||||
if (!(await tmux.hasSession(tmux.sessionPane(s))) && !(await new Promise((r) => setTimeout(r, 300)).then(() => tmux.hasSession(tmux.sessionPane(s))))) {
|
||||
log(`${label}: tmux session gone`);
|
||||
await logSessionEvent(db, s, "tmux_gone");
|
||||
// PEP-244: the container does not depend on tmux — without this it keeps running unattended.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user