@@ -235,7 +235,7 @@ export function createTask<
235235 queue : params . queue ,
236236 retry : params . retry ? { ...defaultRetryOptions , ...params . retry } : undefined ,
237237 machine : typeof params . machine === "string" ? { preset : params . machine } : params . machine ,
238- maxDuration : params . maxDuration ,
238+ maxDuration : params . maxComputeSeconds ?? params . maxDuration ,
239239 payloadSchema : params . jsonSchema ,
240240 fns : {
241241 run : params . run ,
@@ -641,7 +641,7 @@ export async function batchTriggerById<TTask extends AnyTask>(
641641 tags : item . options ?. tags ,
642642 maxAttempts : item . options ?. maxAttempts ,
643643 metadata : item . options ?. metadata ,
644- maxDuration : item . options ?. maxDuration ,
644+ maxDuration : item . options ?. maxComputeSeconds ?? item . options ?. maxDuration ,
645645 idempotencyKey :
646646 ( await makeIdempotencyKey ( item . options ?. idempotencyKey ) ) ?? batchItemIdempotencyKey ,
647647 idempotencyKeyTTL : item . options ?. idempotencyKeyTTL ?? options ?. idempotencyKeyTTL ,
@@ -898,7 +898,7 @@ export async function batchTriggerByIdAndWait<TTask extends AnyTask>(
898898 tags : item . options ?. tags ,
899899 maxAttempts : item . options ?. maxAttempts ,
900900 metadata : item . options ?. metadata ,
901- maxDuration : item . options ?. maxDuration ,
901+ maxDuration : item . options ?. maxComputeSeconds ?? item . options ?. maxDuration ,
902902 idempotencyKey :
903903 ( await makeIdempotencyKey ( item . options ?. idempotencyKey ) ) ?? batchItemIdempotencyKey ,
904904 idempotencyKeyTTL : item . options ?. idempotencyKeyTTL ?? options ?. idempotencyKeyTTL ,
@@ -1157,7 +1157,7 @@ export async function batchTriggerTasks<TTasks extends readonly AnyTask[]>(
11571157 tags : item . options ?. tags ,
11581158 maxAttempts : item . options ?. maxAttempts ,
11591159 metadata : item . options ?. metadata ,
1160- maxDuration : item . options ?. maxDuration ,
1160+ maxDuration : item . options ?. maxComputeSeconds ?? item . options ?. maxDuration ,
11611161 idempotencyKey :
11621162 ( await makeIdempotencyKey ( item . options ?. idempotencyKey ) ) ?? batchItemIdempotencyKey ,
11631163 idempotencyKeyTTL : item . options ?. idempotencyKeyTTL ?? options ?. idempotencyKeyTTL ,
@@ -1419,7 +1419,7 @@ export async function batchTriggerAndWaitTasks<TTasks extends readonly AnyTask[]
14191419 tags : item . options ?. tags ,
14201420 maxAttempts : item . options ?. maxAttempts ,
14211421 metadata : item . options ?. metadata ,
1422- maxDuration : item . options ?. maxDuration ,
1422+ maxDuration : item . options ?. maxComputeSeconds ?? item . options ?. maxDuration ,
14231423 idempotencyKey :
14241424 ( await makeIdempotencyKey ( item . options ?. idempotencyKey ) ) ?? batchItemIdempotencyKey ,
14251425 idempotencyKeyTTL : item . options ?. idempotencyKeyTTL ?? options ?. idempotencyKeyTTL ,
@@ -1821,7 +1821,7 @@ async function* transformBatchItemsStream<TTask extends AnyTask>(
18211821 tags : item . options ?. tags ,
18221822 maxAttempts : item . options ?. maxAttempts ,
18231823 metadata : item . options ?. metadata ,
1824- maxDuration : item . options ?. maxDuration ,
1824+ maxDuration : item . options ?. maxComputeSeconds ?? item . options ?. maxDuration ,
18251825 idempotencyKey :
18261826 ( await makeIdempotencyKey ( item . options ?. idempotencyKey ) ) ?? batchItemIdempotencyKey ,
18271827 idempotencyKeyTTL : item . options ?. idempotencyKeyTTL ?? options ?. idempotencyKeyTTL ,
@@ -1874,7 +1874,7 @@ async function* transformBatchItemsStreamForWait<TTask extends AnyTask>(
18741874 tags : item . options ?. tags ,
18751875 maxAttempts : item . options ?. maxAttempts ,
18761876 metadata : item . options ?. metadata ,
1877- maxDuration : item . options ?. maxDuration ,
1877+ maxDuration : item . options ?. maxComputeSeconds ?? item . options ?. maxDuration ,
18781878 idempotencyKey :
18791879 ( await makeIdempotencyKey ( item . options ?. idempotencyKey ) ) ?? batchItemIdempotencyKey ,
18801880 idempotencyKeyTTL : item . options ?. idempotencyKeyTTL ?? options ?. idempotencyKeyTTL ,
@@ -1924,7 +1924,7 @@ async function* transformBatchByTaskItemsStream<TTasks extends readonly AnyTask[
19241924 tags : item . options ?. tags ,
19251925 maxAttempts : item . options ?. maxAttempts ,
19261926 metadata : item . options ?. metadata ,
1927- maxDuration : item . options ?. maxDuration ,
1927+ maxDuration : item . options ?. maxComputeSeconds ?? item . options ?. maxDuration ,
19281928 idempotencyKey :
19291929 ( await makeIdempotencyKey ( item . options ?. idempotencyKey ) ) ?? batchItemIdempotencyKey ,
19301930 idempotencyKeyTTL : item . options ?. idempotencyKeyTTL ?? options ?. idempotencyKeyTTL ,
@@ -1976,7 +1976,7 @@ async function* transformBatchByTaskItemsStreamForWait<TTasks extends readonly A
19761976 tags : item . options ?. tags ,
19771977 maxAttempts : item . options ?. maxAttempts ,
19781978 metadata : item . options ?. metadata ,
1979- maxDuration : item . options ?. maxDuration ,
1979+ maxDuration : item . options ?. maxComputeSeconds ?? item . options ?. maxDuration ,
19801980 idempotencyKey :
19811981 ( await makeIdempotencyKey ( item . options ?. idempotencyKey ) ) ?? batchItemIdempotencyKey ,
19821982 idempotencyKeyTTL : item . options ?. idempotencyKeyTTL ?? options ?. idempotencyKeyTTL ,
@@ -2028,7 +2028,7 @@ async function* transformSingleTaskBatchItemsStream<TPayload>(
20282028 tags : item . options ?. tags ,
20292029 maxAttempts : item . options ?. maxAttempts ,
20302030 metadata : item . options ?. metadata ,
2031- maxDuration : item . options ?. maxDuration ,
2031+ maxDuration : item . options ?. maxComputeSeconds ?? item . options ?. maxDuration ,
20322032 idempotencyKey :
20332033 ( await makeIdempotencyKey ( item . options ?. idempotencyKey ) ) ?? batchItemIdempotencyKey ,
20342034 idempotencyKeyTTL : item . options ?. idempotencyKeyTTL ?? options ?. idempotencyKeyTTL ,
@@ -2089,7 +2089,7 @@ async function* transformSingleTaskBatchItemsStreamForWait<TPayload>(
20892089 tags : item . options ?. tags ,
20902090 maxAttempts : item . options ?. maxAttempts ,
20912091 metadata : item . options ?. metadata ,
2092- maxDuration : item . options ?. maxDuration ,
2092+ maxDuration : item . options ?. maxComputeSeconds ?? item . options ?. maxDuration ,
20932093 idempotencyKey : finalIdempotencyKey ?. toString ( ) ,
20942094 idempotencyKeyTTL : item . options ?. idempotencyKeyTTL ?? options ?. idempotencyKeyTTL ,
20952095 idempotencyKeyOptions,
@@ -2139,7 +2139,7 @@ async function trigger_internal<TRunTypes extends AnyRunTypes>(
21392139 tags : options ?. tags ,
21402140 maxAttempts : options ?. maxAttempts ,
21412141 metadata : options ?. metadata ,
2142- maxDuration : options ?. maxDuration ,
2142+ maxDuration : options ?. maxComputeSeconds ?? options ?. maxDuration ,
21432143 parentRunId : taskContext . ctx ?. run . id ,
21442144 machine : options ?. machine ,
21452145 priority : options ?. priority ,
@@ -2223,7 +2223,7 @@ async function batchTrigger_internal<TRunTypes extends AnyRunTypes>(
22232223 tags : item . options ?. tags ,
22242224 maxAttempts : item . options ?. maxAttempts ,
22252225 metadata : item . options ?. metadata ,
2226- maxDuration : item . options ?. maxDuration ,
2226+ maxDuration : item . options ?. maxComputeSeconds ?? item . options ?. maxDuration ,
22272227 idempotencyKey : finalIdempotencyKey ?. toString ( ) ,
22282228 idempotencyKeyTTL : item . options ?. idempotencyKeyTTL ?? options ?. idempotencyKeyTTL ,
22292229 idempotencyKeyOptions,
@@ -2498,7 +2498,7 @@ async function batchTriggerAndWait_internal<TIdentifier extends string, TPayload
24982498 tags : item . options ?. tags ,
24992499 maxAttempts : item . options ?. maxAttempts ,
25002500 metadata : item . options ?. metadata ,
2501- maxDuration : item . options ?. maxDuration ,
2501+ maxDuration : item . options ?. maxComputeSeconds ?? item . options ?. maxDuration ,
25022502 idempotencyKey : finalIdempotencyKey ?. toString ( ) ,
25032503 idempotencyKeyTTL : item . options ?. idempotencyKeyTTL ?? options ?. idempotencyKeyTTL ,
25042504 idempotencyKeyOptions,
0 commit comments