Skip to content

Pr 3200 fix#3343

Closed
deepshekhardas wants to merge 3 commits intotriggerdotdev:mainfrom
deepshekhardas:pr-3200-fix
Closed

Pr 3200 fix#3343
deepshekhardas wants to merge 3 commits intotriggerdotdev:mainfrom
deepshekhardas:pr-3200-fix

Conversation

@deepshekhardas
Copy link
Copy Markdown

Closes #

✅ Checklist

  • I have followed every step in the contributing guide
  • The PR title follows the convention.
  • I ran and tested the code works

Testing

[Describe the steps you took to test this change]


Changelog

[Short description of what has changed]


Screenshots

[Screenshots]

💯

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

⚠️ No Changeset found

Latest commit: bdfb430

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Hi @deepshekhardas, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions bot closed this Apr 8, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1cec35c7-27fe-4eb9-bfb9-a608e261176c

📥 Commits

Reviewing files that changed from the base of the PR and between def21b2 and bdfb430.

📒 Files selected for processing (4)
  • docs/config/config-file.mdx
  • docs/runs.mdx
  • docs/tasks/overview.mdx
  • docs/tasks/scheduled.mdx

Walkthrough

The pull request adds documentation for a new TTL (Time-to-Live) feature across four documentation files. The changes introduce a three-tier TTL resolution model where per-trigger TTL takes precedence over task-level TTL, which takes precedence over global config-level TTL. Documentation includes examples for setting TTL at the config level in defineConfig, at the task level in task definitions, at the trigger level when calling tasks, and on scheduled tasks. The changes also document the ability to opt out of higher-precedence TTL settings using ttl: 0 and specify that runs expire if not dequeued within the configured TTL.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 1 additional finding in Devin Review.

Open in Devin Review

Comment on lines +353 to +367
## TTL

You can set a default time-to-live (TTL) for all task runs in your project. If a run is not dequeued within this time, it will expire and never execute.

```ts trigger.config.ts
import { defineConfig } from "@trigger.dev/sdk";

export default defineConfig({
project: "<project ref>",
// Your other config settings...
ttl: "1h", // Also accepts a number of seconds, e.g. 3600
});
```

You can override this on a per-task basis by setting `ttl` on the task definition, or per-trigger by passing `ttl` in the trigger options. To opt a specific task out of the config-level TTL, set `ttl: 0` on the task. See [Time-to-live (TTL)](/runs#time-to-live-ttl) for more information.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚩 Documented TTL features not yet present in TypeScript types

The documentation describes setting ttl on task definitions (e.g. task({ id: "my-task", ttl: "10m", ... })) and in trigger.config.ts (e.g. defineConfig({ ttl: "1h" })). However, neither CommonTaskOptions at packages/core/src/v3/types/tasks.ts:173 nor TriggerConfig at packages/core/src/v3/config.ts:43 currently include a ttl property. Only the trigger-level ttl option exists (at packages/core/src/v3/types/tasks.ts:814 in the trigger options type). This suggests the docs are being written ahead of or in parallel with a feature PR that adds these type definitions. If the feature PR hasn't landed yet, merging these docs first would document non-existent functionality for users.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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