Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

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

  • New feature

Testing

Tested manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Sep 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sim Ready Ready Preview Comment Sep 30, 2025 7:12pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Sep 30, 2025 7:12pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Loading

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs September 30, 2025 19:08 Inactive
@waleedlatif1 waleedlatif1 merged commit 1a2c404 into staging Oct 1, 2025
8 checks passed
@waleedlatif1 waleedlatif1 deleted the improvement/trigger branch October 1, 2025 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants