Skip to content

Commit 826dd4d

Browse files
committed
Add randomness
1 parent 9fc7c65 commit 826dd4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/evals/src/cli/processTask.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const processTask = async ({ taskId, logger }: { taskId: number; logger?:
5151
export const processTaskInContainer = async ({
5252
taskId,
5353
logger,
54-
maxRetries = 3,
54+
maxRetries = 5,
5555
}: {
5656
taskId: number
5757
logger: FileLogger
@@ -76,7 +76,7 @@ export const processTaskInContainer = async ({
7676
const isRetry = attempt > 0
7777

7878
if (isRetry) {
79-
const delayMs = Math.pow(2, attempt - 1) * 1000
79+
const delayMs = Math.pow(2, attempt - 1) * 1000 * (0.5 + Math.random())
8080
logger.info(`retrying in ${delayMs}ms (attempt ${attempt + 1}/${maxRetries + 1})`)
8181
await new Promise((resolve) => setTimeout(resolve, delayMs))
8282
}

0 commit comments

Comments
 (0)