Skip to content

Commit 6c67932

Browse files
committed
Fix for TaskRunErrorCodes.MAX_DURATION_EXCEEDED error saying ms when it’s seconds
1 parent 8977d25 commit 6c67932

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/core/src/v3/workers/taskExecutor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ export class TaskExecutor {
383383
reject(
384384
new InternalError({
385385
code: TaskRunErrorCodes.MAX_DURATION_EXCEEDED,
386-
message: `Task execution exceeded maximum duration of ${maxDuration}ms`,
386+
message: `Run exceeded maximum compute time (maxDuration) of ${maxDuration} seconds`,
387387
})
388388
);
389389
});

packages/core/test/taskExecutor.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,7 @@ describe("TaskExecutor", () => {
14171417

14181418
test("should handle max duration abort signal and call hooks in correct order", async () => {
14191419
const executionOrder: string[] = [];
1420-
const maxDurationMs = 1000;
1420+
const maxDurationSeconds = 1000;
14211421

14221422
// Create an abort controller that we'll trigger manually
14231423
const controller = new AbortController();
@@ -1439,7 +1439,7 @@ describe("TaskExecutor", () => {
14391439
fn: async ({ error }) => {
14401440
executionOrder.push("failure");
14411441
expect((error as Error).message).toBe(
1442-
`Task execution exceeded maximum duration of ${maxDurationMs}ms`
1442+
`Run exceeded maximum compute time (maxDuration) of ${maxDurationSeconds} seconds`
14431443
);
14441444
},
14451445
});
@@ -1494,7 +1494,7 @@ describe("TaskExecutor", () => {
14941494
error: {
14951495
type: "INTERNAL_ERROR",
14961496
code: TaskRunErrorCodes.MAX_DURATION_EXCEEDED,
1497-
message: "Task execution exceeded maximum duration of 1000ms",
1497+
message: "Run exceeded maximum compute time (maxDuration) of 1000 seconds",
14981498
stackTrace: expect.any(String),
14991499
},
15001500
skippedRetrying: false,

0 commit comments

Comments
 (0)