mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 21:24:32 +00:00
perf(test): speed subagent announce retry polling in fast mode
This commit is contained in:
@@ -219,7 +219,7 @@ async function readLatestSubagentOutputWithRetry(params: {
|
|||||||
sessionKey: string;
|
sessionKey: string;
|
||||||
maxWaitMs: number;
|
maxWaitMs: number;
|
||||||
}): Promise<string | undefined> {
|
}): Promise<string | undefined> {
|
||||||
const RETRY_INTERVAL_MS = 100;
|
const RETRY_INTERVAL_MS = FAST_TEST_MODE ? 25 : 100;
|
||||||
const deadline = Date.now() + Math.max(0, Math.min(params.maxWaitMs, 15_000));
|
const deadline = Date.now() + Math.max(0, Math.min(params.maxWaitMs, 15_000));
|
||||||
let result: string | undefined;
|
let result: string | undefined;
|
||||||
while (Date.now() < deadline) {
|
while (Date.now() < deadline) {
|
||||||
@@ -241,7 +241,7 @@ async function waitForSubagentOutputChange(params: {
|
|||||||
if (!baseline) {
|
if (!baseline) {
|
||||||
return params.baselineReply;
|
return params.baselineReply;
|
||||||
}
|
}
|
||||||
const RETRY_INTERVAL_MS = 100;
|
const RETRY_INTERVAL_MS = FAST_TEST_MODE ? 25 : 100;
|
||||||
const deadline = Date.now() + Math.max(0, Math.min(params.maxWaitMs, 5_000));
|
const deadline = Date.now() + Math.max(0, Math.min(params.maxWaitMs, 5_000));
|
||||||
let latest = params.baselineReply;
|
let latest = params.baselineReply;
|
||||||
while (Date.now() < deadline) {
|
while (Date.now() < deadline) {
|
||||||
|
|||||||
Reference in New Issue
Block a user