Skip to content

Commit b25ed4c

Browse files
committed
chore(references): use maxComputeSeconds in hello-world for manual testing
- trigger.config.ts: top-level maxComputeSeconds - example.ts: per-task maxComputeSeconds on maxDurationTask - example.ts: per-trigger override on triggerAndWait Variable name maxDurationTask kept since it labels the legacy fixture concept; the payload.maxDuration field is unrelated to the SDK property and untouched.
1 parent fa399ca commit b25ed4c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

references/hello-world/src/trigger/example.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export const maxDurationTask = task({
139139
maxTimeoutInMs: 2_000,
140140
factor: 1.4,
141141
},
142-
maxDuration: 5,
142+
maxComputeSeconds: 5,
143143
run: async (payload: { sleepFor: number }, { signal, ctx }) => {
144144
await setTimeout(payload.sleepFor * 1000, { signal });
145145
},
@@ -150,7 +150,7 @@ export const maxDurationParentTask = task({
150150
run: async (payload: { sleepFor?: number; maxDuration?: number }, { ctx, signal }) => {
151151
const result = await maxDurationTask.triggerAndWait(
152152
{ sleepFor: payload.sleepFor ?? 10 },
153-
{ maxDuration: timeout.None }
153+
{ maxComputeSeconds: timeout.None }
154154
);
155155

156156
return result;

references/hello-world/trigger.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineConfig({
1010
maxExecutionsPerProcess: 20,
1111
},
1212
logLevel: "debug",
13-
maxDuration: 3600,
13+
maxComputeSeconds: 3600,
1414
ttl: "1h",
1515
retries: {
1616
enabledInDev: true,

0 commit comments

Comments
 (0)