Skip to content

Commit 4d99f68

Browse files
committed
test: add TTL examples to hello-world reference project
1 parent 13e7b4a commit 4d99f68

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

references/hello-world/src/trigger/example.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { fixedLengthTask } from "./batches.js";
55

66
export const helloWorldTask = task({
77
id: "hello-world",
8+
ttl: "10m",
89
retry: {
910
maxAttempts: 3,
1011
minTimeoutInMs: 500,

references/hello-world/src/trigger/schedule.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { schedules } from "@trigger.dev/sdk/v3";
33
export const simpleSchedule = schedules.task({
44
id: "simple-schedule",
55
cron: "0 0 * * *",
6+
ttl: "30m",
67
run: async (payload, { ctx }) => {
78
return {
89
message: "Hello, world!",

references/hello-world/trigger.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default defineConfig({
1111
},
1212
logLevel: "debug",
1313
maxDuration: 3600,
14+
ttl: "1h",
1415
retries: {
1516
enabledInDev: true,
1617
default: {

0 commit comments

Comments
 (0)