improvement(trigger): increase maxDuration for background tasks to 10 min to match sync API executions#1504
Conversation
… min to match sync API executions
There was a problem hiding this comment.
Greptile Overview
Summary
This PR increases the `maxDuration` timeout configuration for Trigger.dev background tasks from 180 seconds (3 minutes) to 600 seconds (10 minutes). The change is made in the `trigger.config.ts` file, which is the configuration file for Trigger.dev integration within the Sim Studio codebase.The purpose of this change is to align timeout consistency between asynchronous and synchronous execution modes. Previously, async executions handled by Trigger.dev had a shorter 3-minute timeout while synchronous API executions were allowed to run for up to 10 minutes. This inconsistency could cause async tasks to timeout prematurely when they needed the same processing time as their synchronous counterparts.
This configuration change affects all background tasks managed by Trigger.dev in the application, ensuring they now have consistent execution time limits regardless of execution mode. The change integrates with the existing Trigger.dev infrastructure without requiring modifications to the actual task execution logic or other parts of the codebase.
Changed Files
| Filename | Score | Overview |
|---|---|---|
| apps/sim/trigger.config.ts | 5/5 | Increased maxDuration timeout from 180 to 600 seconds for Trigger.dev background tasks |
Confidence score: 5/5
- This PR is safe to merge with minimal risk
- Score reflects a simple configuration change with clear purpose and no complex logic modifications
- No files require special attention
Sequence Diagram
sequenceDiagram
participant User
participant "Application" as App
participant "Trigger.dev" as Trigger
participant "Background Task" as BgTask
participant "Sync API" as API
User->>App: "Initiate workflow execution"
App->>Trigger: "Submit background task"
Trigger->>BgTask: "Execute task (max 10min timeout)"
BgTask->>API: "Call sync API execution"
API-->>BgTask: "Return execution result (within 10min)"
BgTask-->>Trigger: "Task completion status"
Trigger-->>App: "Background task result"
App-->>User: "Workflow execution complete"
1 file reviewed, no comments
Summary
increase maxDuration for background tasks to 10 min to match sync API executions. previously, the async executions had a timeout of 180s but we increase that to 10m to match the synchronous executions timeout
Type of Change
Testing
Tested manually.
Checklist