PEP-248: задание, которое исполнитель не берёт, — не очередь проверок #235
@ -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