Skip to content

Commit 1a2c404

Browse files
authored
improvement(trigger): increase maxDuration for background tasks to 10 min to match sync API executions (#1504)
* improvement(trigger): increase maxDuration for background tasks to 10 min to match sync API executions * add trigger proj id
1 parent 4ad9be0 commit 1a2c404

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

apps/sim/lib/env.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export const env = createEnv({
103103
DOCKER_BUILD: z.boolean().optional(), // Flag indicating Docker build environment
104104

105105
// Background Jobs & Scheduling
106+
TRIGGER_PROJECT_ID: z.string().optional(), // Trigger.dev project ID
106107
TRIGGER_SECRET_KEY: z.string().min(1).optional(), // Trigger.dev secret key for background jobs
107108
TRIGGER_DEV_ENABLED: z.boolean().optional(), // Toggle to enable/disable Trigger.dev for async jobs
108109
CRON_SECRET: z.string().optional(), // Secret for authenticating cron job requests

apps/sim/trigger.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { defineConfig } from '@trigger.dev/sdk'
2+
import { env } from './lib/env'
23

34
export default defineConfig({
4-
project: 'proj_kufttkwzywcydwtccqhx',
5+
project: env.TRIGGER_PROJECT_ID ?? '',
56
runtime: 'node',
67
logLevel: 'log',
7-
maxDuration: 180,
8+
maxDuration: 600,
89
retries: {
910
enabledInDev: false,
1011
default: {

0 commit comments

Comments
 (0)