fix: silence probe timeouts
This commit is contained in:
@@ -79,6 +79,7 @@ export async function runEmbeddedPiAgent(
|
||||
? "markdown"
|
||||
: "plain"
|
||||
: "markdown");
|
||||
const isProbeSession = params.sessionId?.startsWith("probe-") ?? false;
|
||||
|
||||
return enqueueCommandInLane(sessionLane, () =>
|
||||
enqueueGlobal(async () => {
|
||||
@@ -455,7 +456,7 @@ export async function runEmbeddedPiAgent(
|
||||
cfg: params.config,
|
||||
agentDir: params.agentDir,
|
||||
});
|
||||
if (timedOut) {
|
||||
if (timedOut && !isProbeSession) {
|
||||
log.warn(
|
||||
`Profile ${lastProfileId} timed out (possible rate limit). Trying next account...`,
|
||||
);
|
||||
|
||||
@@ -595,18 +595,23 @@ export async function runEmbeddedAttempt(
|
||||
setActiveEmbeddedRun(params.sessionId, queueHandle);
|
||||
|
||||
let abortWarnTimer: NodeJS.Timeout | undefined;
|
||||
const isProbeSession = params.sessionId?.startsWith("probe-") ?? false;
|
||||
const abortTimer = setTimeout(
|
||||
() => {
|
||||
log.warn(
|
||||
`embedded run timeout: runId=${params.runId} sessionId=${params.sessionId} timeoutMs=${params.timeoutMs}`,
|
||||
);
|
||||
if (!isProbeSession) {
|
||||
log.warn(
|
||||
`embedded run timeout: runId=${params.runId} sessionId=${params.sessionId} timeoutMs=${params.timeoutMs}`,
|
||||
);
|
||||
}
|
||||
abortRun(true);
|
||||
if (!abortWarnTimer) {
|
||||
abortWarnTimer = setTimeout(() => {
|
||||
if (!activeSession.isStreaming) return;
|
||||
log.warn(
|
||||
`embedded run abort still streaming: runId=${params.runId} sessionId=${params.sessionId}`,
|
||||
);
|
||||
if (!isProbeSession) {
|
||||
log.warn(
|
||||
`embedded run abort still streaming: runId=${params.runId} sessionId=${params.sessionId}`,
|
||||
);
|
||||
}
|
||||
}, 10_000);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user