Skip to content

Commit d1c5845

Browse files
matt-aitkenericallam
authored andcommitted
Require maxDuration in trigger.config from now on
1 parent 6e02cbe commit d1c5845

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/cli-v3/src/config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@ function validateConfig(config: TriggerConfig, warn = true) {
289289
config.build.extensions.push(adaptResolveEnvVarsToSyncEnvVarsExtension(resolveEnvVarsFn));
290290
}
291291

292+
if (!config.maxDuration) {
293+
throw new Error(
294+
`The "maxDuration" trigger.config option is now required, and must be at least 5 seconds.`
295+
);
296+
}
297+
292298
if (config.runtime && config.runtime === "bun") {
293299
warn &&
294300
prettyWarning(

packages/core/src/v3/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export type TriggerConfig = {
116116
*
117117
* @see https://trigger.dev/docs/tasks/overview#maxduration-option
118118
*/
119-
maxDuration?: number;
119+
maxDuration: number;
120120

121121
/**
122122
* Enable console logging while running the dev CLI. This will print out logs from console.log, console.warn, and console.error. By default all logs are sent to the trigger.dev backend, and not logged to the console.

0 commit comments

Comments
 (0)