[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trigger-dev-trigger-tasks":3,"mdc--63aiww-key":35,"related-repo-trigger-dev-trigger-tasks":7103,"related-org-trigger-dev-trigger-tasks":7185},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":30,"sourceUrl":33,"mdContent":34},"trigger-tasks","build durable background tasks with Trigger.dev","Build AI agents, workflows and durable background tasks with Trigger.dev. Use when creating tasks, triggering jobs, handling retries, scheduling cron jobs, or implementing queues and concurrency control.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"trigger-dev","Trigger.dev","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftrigger-dev.jpg","triggerdotdev",[13,17,18,21],{"name":14,"slug":15,"type":16},"Backend","backend","tag",{"name":9,"slug":8,"type":16},{"name":19,"slug":20,"type":16},"Agents","agents",{"name":22,"slug":23,"type":16},"Workflow Automation","workflow-automation",30,"https:\u002F\u002Fgithub.com\u002Ftriggerdotdev\u002Fskills","2026-04-06T18:54:43.514369",null,5,[],{"repoUrl":25,"stars":24,"forks":28,"topics":31,"description":32},[],"Best practices for building AI agents and background jobs with Trigger.dev. Use when creating durable tasks, scheduling workflows, or integrating with the Trigger.dev SDK.","https:\u002F\u002Fgithub.com\u002Ftriggerdotdev\u002Fskills\u002Ftree\u002FHEAD\u002Ftrigger-tasks","---\nname: trigger-tasks\ndescription: Build AI agents, workflows and durable background tasks with Trigger.dev. Use when creating tasks, triggering jobs, handling retries, scheduling cron jobs, or implementing queues and concurrency control.\n---\n\n# Trigger.dev Tasks\n\nBuild durable background tasks that run reliably with automatic retries, queuing, and observability.\n\n## When to Use\n\n- Creating background jobs or async workflows\n- Building AI agents that need long-running execution\n- Processing webhooks, emails, or file uploads\n- Scheduling recurring tasks (cron)\n- Any work that shouldn't block your main application\n\n## Critical Rules\n\n1. **Always use `@trigger.dev\u002Fsdk`** — never use deprecated `client.defineJob`\n2. **Check `result.ok`** before accessing `result.output` from `triggerAndWait()`\n3. **Never use `Promise.all`** with `triggerAndWait()` or `wait.*` calls\n4. **Export tasks** from files in your `trigger\u002F` directory\n\n## Basic Task\n\n```ts\nimport { task } from \"@trigger.dev\u002Fsdk\";\n\nexport const processData = task({\n  id: \"process-data\",\n  retry: {\n    maxAttempts: 10,\n    factor: 1.8,\n    minTimeoutInMs: 500,\n    maxTimeoutInMs: 30_000,\n  },\n  run: async (payload: { userId: string; data: any[] }) => {\n    console.log(`Processing ${payload.data.length} items`);\n    return { processed: payload.data.length };\n  },\n});\n```\n\n## Schema Task (Validated Input)\n\n```ts\nimport { schemaTask } from \"@trigger.dev\u002Fsdk\";\nimport { z } from \"zod\";\n\nexport const validatedTask = schemaTask({\n  id: \"validated-task\",\n  schema: z.object({\n    name: z.string(),\n    email: z.string().email(),\n  }),\n  run: async (payload) => {\n    \u002F\u002F payload is typed and validated\n    return { message: `Hello ${payload.name}` };\n  },\n});\n```\n\n## Triggering Tasks\n\n### From Backend Code\n\n```ts\nimport { tasks } from \"@trigger.dev\u002Fsdk\";\nimport type { processData } from \".\u002Ftrigger\u002Ftasks\";\n\n\u002F\u002F Single trigger (fire and forget)\nconst handle = await tasks.trigger\u003Ctypeof processData>(\"process-data\", {\n  userId: \"123\",\n  data: [{ id: 1 }],\n});\n\n\u002F\u002F Batch trigger (up to 1,000 items, 3MB per payload)\nconst batchHandle = await tasks.batchTrigger\u003Ctypeof processData>(\"process-data\", [\n  { payload: { userId: \"123\", data: [] } },\n  { payload: { userId: \"456\", data: [] } },\n]);\n```\n\n### From Inside Tasks\n\n```ts\nexport const parentTask = task({\n  id: \"parent-task\",\n  run: async (payload) => {\n    \u002F\u002F Fire and forget\n    const handle = await childTask.trigger({ data: \"value\" });\n\n    \u002F\u002F Wait for result - returns Result object, NOT direct output\n    const result = await childTask.triggerAndWait({ data: \"value\" });\n    if (result.ok) {\n      console.log(\"Output:\", result.output);\n    } else {\n      console.error(\"Failed:\", result.error);\n    }\n\n    \u002F\u002F Quick unwrap (throws on error)\n    const output = await childTask.triggerAndWait({ data: \"value\" }).unwrap();\n\n    \u002F\u002F Batch with wait\n    const results = await childTask.batchTriggerAndWait([\n      { payload: { data: \"item1\" } },\n      { payload: { data: \"item2\" } },\n    ]);\n  },\n});\n```\n\n## Waits\n\n```ts\nimport { task, wait } from \"@trigger.dev\u002Fsdk\";\n\nexport const taskWithWaits = task({\n  id: \"task-with-waits\",\n  run: async (payload) => {\n    await wait.for({ seconds: 30 });\n    await wait.for({ minutes: 5 });\n    await wait.until({ date: new Date(\"2024-12-25\") });\n\n    \u002F\u002F Wait for external approval\n    await wait.forToken({\n      token: \"user-approval-token\",\n      timeoutInSeconds: 3600,\n    });\n  },\n});\n```\n\n> Waits > 5 seconds are checkpointed and don't count toward compute.\n\n## Concurrency & Queues\n\n```ts\nimport { task, queue } from \"@trigger.dev\u002Fsdk\";\n\n\u002F\u002F Shared queue\nconst emailQueue = queue({\n  name: \"email-processing\",\n  concurrencyLimit: 5,\n});\n\n\u002F\u002F Task-level concurrency\nexport const oneAtATime = task({\n  id: \"sequential-task\",\n  queue: { concurrencyLimit: 1 },\n  run: async (payload) => {\n    \u002F\u002F Only one instance runs at a time\n  },\n});\n\n\u002F\u002F Use shared queue\nexport const emailTask = task({\n  id: \"send-email\",\n  queue: emailQueue,\n  run: async (payload) => {},\n});\n\n\u002F\u002F Per-tenant concurrency (at trigger time)\nawait childTask.trigger(payload, {\n  queue: {\n    name: `user-${userId}`,\n    concurrencyLimit: 2,\n  },\n});\n```\n\n## Debouncing\n\nConsolidate rapid triggers into a single execution:\n\n```ts\nawait myTask.trigger(\n  { userId: \"123\" },\n  {\n    debounce: {\n      key: \"user-123-update\",\n      delay: \"5s\",\n      mode: \"trailing\", \u002F\u002F Use latest payload (default: \"leading\")\n    },\n  }\n);\n```\n\n## Idempotency\n\n```ts\nimport { task, idempotencyKeys } from \"@trigger.dev\u002Fsdk\";\n\nexport const paymentTask = task({\n  id: \"process-payment\",\n  run: async (payload: { orderId: string }) => {\n    const key = await idempotencyKeys.create(`payment-${payload.orderId}`);\n\n    await chargeCustomer.trigger(payload, {\n      idempotencyKey: key,\n      idempotencyKeyTTL: \"24h\",\n    });\n  },\n});\n```\n\n## Error Handling & Retries\n\n```ts\nimport { task, retry, AbortTaskRunError } from \"@trigger.dev\u002Fsdk\";\n\nexport const resilientTask = task({\n  id: \"resilient-task\",\n  retry: {\n    maxAttempts: 10,\n    factor: 1.8,\n    minTimeoutInMs: 500,\n    maxTimeoutInMs: 30_000,\n  },\n  catchError: async ({ error, ctx }) => {\n    if (error.code === \"FATAL_ERROR\") {\n      throw new AbortTaskRunError(\"Cannot retry\");\n    }\n    return { retryAt: new Date(Date.now() + 60000) };\n  },\n  run: async (payload) => {\n    \u002F\u002F Retry specific operations\n    const result = await retry.onThrow(\n      async () => unstableApiCall(payload),\n      { maxAttempts: 3 }\n    );\n\n    \u002F\u002F HTTP retries with conditions\n    const response = await retry.fetch(\"https:\u002F\u002Fapi.example.com\", {\n      retry: {\n        maxAttempts: 5,\n        condition: (res, err) => res?.status === 429 || res?.status >= 500,\n      },\n    });\n  },\n});\n```\n\n## Scheduled Tasks (Cron)\n\n```ts\nimport { schedules } from \"@trigger.dev\u002Fsdk\";\n\n\u002F\u002F Declarative schedule\nexport const dailyTask = schedules.task({\n  id: \"daily-cleanup\",\n  cron: \"0 0 * * *\", \u002F\u002F Midnight UTC\n  run: async (payload) => {\n    \u002F\u002F payload.timestamp - scheduled time\n    \u002F\u002F payload.timezone - IANA timezone\n    \u002F\u002F payload.scheduleId - schedule identifier\n  },\n});\n\n\u002F\u002F With timezone\nexport const tokyoTask = schedules.task({\n  id: \"tokyo-morning\",\n  cron: { pattern: \"0 9 * * *\", timezone: \"Asia\u002FTokyo\" },\n  run: async () => {},\n});\n\n\u002F\u002F Dynamic\u002Fmulti-tenant schedules\nawait schedules.create({\n  task: \"reminder-task\",\n  cron: \"0 8 * * *\",\n  timezone: \"America\u002FNew_York\",\n  externalId: userId,\n  deduplicationKey: `${userId}-daily`,\n});\n```\n\n## Metadata & Progress\n\n```ts\nimport { task, metadata } from \"@trigger.dev\u002Fsdk\";\n\nexport const batchProcessor = task({\n  id: \"batch-processor\",\n  run: async (payload: { items: any[] }) => {\n    metadata.set(\"progress\", 0).set(\"total\", payload.items.length);\n\n    for (let i = 0; i \u003C payload.items.length; i++) {\n      await processItem(payload.items[i]);\n      metadata.set(\"progress\", ((i + 1) \u002F payload.items.length) * 100);\n    }\n\n    metadata.set(\"status\", \"completed\");\n  },\n});\n```\n\n## Tags\n\n```ts\nimport { task, tags } from \"@trigger.dev\u002Fsdk\";\n\nexport const processUser = task({\n  id: \"process-user\",\n  run: async (payload: { userId: string }) => {\n    await tags.add(`user_${payload.userId}`);\n  },\n});\n\n\u002F\u002F Trigger with tags\nawait processUser.trigger(\n  { userId: \"123\" },\n  { tags: [\"priority\", \"user_123\"] }\n);\n```\n\n## Machine Presets\n\n```ts\nexport const heavyTask = task({\n  id: \"heavy-computation\",\n  machine: { preset: \"large-2x\" }, \u002F\u002F 8 vCPU, 16 GB RAM\n  maxDuration: 1800, \u002F\u002F 30 minutes\n  run: async (payload) => {},\n});\n```\n\n| Preset | vCPU | RAM |\n|--------|------|-----|\n| micro | 0.25 | 0.25 GB |\n| small-1x | 0.5 | 0.5 GB (default) |\n| small-2x | 1 | 1 GB |\n| medium-1x | 1 | 2 GB |\n| medium-2x | 2 | 4 GB |\n| large-1x | 4 | 8 GB |\n| large-2x | 8 | 16 GB |\n\n## Best Practices\n\n1. **Make tasks idempotent** — safe to retry without side effects\n2. **Use queues** to prevent overwhelming external services\n3. **Configure appropriate retries** with exponential backoff\n4. **Track progress with metadata** for long-running tasks\n5. **Use debouncing** for user activity and webhook bursts\n6. **Match machine size** to computational requirements\n\nSee `references\u002F` for detailed documentation on each feature.\n",{"data":36,"body":37},{"name":4,"description":6},{"type":38,"children":39},"root",[40,49,55,62,92,98,205,211,719,725,1130,1136,1143,1645,1651,2393,2399,2874,2883,2889,3519,3525,3530,3736,3742,4125,4131,4983,4989,5628,5634,6255,6261,6661,6667,6858,7015,7021,7084,7097],{"type":41,"tag":42,"props":43,"children":45},"element","h1",{"id":44},"triggerdev-tasks",[46],{"type":47,"value":48},"text","Trigger.dev Tasks",{"type":41,"tag":50,"props":51,"children":52},"p",{},[53],{"type":47,"value":54},"Build durable background tasks that run reliably with automatic retries, queuing, and observability.",{"type":41,"tag":56,"props":57,"children":59},"h2",{"id":58},"when-to-use",[60],{"type":47,"value":61},"When to Use",{"type":41,"tag":63,"props":64,"children":65},"ul",{},[66,72,77,82,87],{"type":41,"tag":67,"props":68,"children":69},"li",{},[70],{"type":47,"value":71},"Creating background jobs or async workflows",{"type":41,"tag":67,"props":73,"children":74},{},[75],{"type":47,"value":76},"Building AI agents that need long-running execution",{"type":41,"tag":67,"props":78,"children":79},{},[80],{"type":47,"value":81},"Processing webhooks, emails, or file uploads",{"type":41,"tag":67,"props":83,"children":84},{},[85],{"type":47,"value":86},"Scheduling recurring tasks (cron)",{"type":41,"tag":67,"props":88,"children":89},{},[90],{"type":47,"value":91},"Any work that shouldn't block your main application",{"type":41,"tag":56,"props":93,"children":95},{"id":94},"critical-rules",[96],{"type":47,"value":97},"Critical Rules",{"type":41,"tag":99,"props":100,"children":101},"ol",{},[102,126,156,187],{"type":41,"tag":67,"props":103,"children":104},{},[105,118,120],{"type":41,"tag":106,"props":107,"children":108},"strong",{},[109,111],{"type":47,"value":110},"Always use ",{"type":41,"tag":112,"props":113,"children":115},"code",{"className":114},[],[116],{"type":47,"value":117},"@trigger.dev\u002Fsdk",{"type":47,"value":119}," — never use deprecated ",{"type":41,"tag":112,"props":121,"children":123},{"className":122},[],[124],{"type":47,"value":125},"client.defineJob",{"type":41,"tag":67,"props":127,"children":128},{},[129,140,142,148,150],{"type":41,"tag":106,"props":130,"children":131},{},[132,134],{"type":47,"value":133},"Check ",{"type":41,"tag":112,"props":135,"children":137},{"className":136},[],[138],{"type":47,"value":139},"result.ok",{"type":47,"value":141}," before accessing ",{"type":41,"tag":112,"props":143,"children":145},{"className":144},[],[146],{"type":47,"value":147},"result.output",{"type":47,"value":149}," from ",{"type":41,"tag":112,"props":151,"children":153},{"className":152},[],[154],{"type":47,"value":155},"triggerAndWait()",{"type":41,"tag":67,"props":157,"children":158},{},[159,170,172,177,179,185],{"type":41,"tag":106,"props":160,"children":161},{},[162,164],{"type":47,"value":163},"Never use ",{"type":41,"tag":112,"props":165,"children":167},{"className":166},[],[168],{"type":47,"value":169},"Promise.all",{"type":47,"value":171}," with ",{"type":41,"tag":112,"props":173,"children":175},{"className":174},[],[176],{"type":47,"value":155},{"type":47,"value":178}," or ",{"type":41,"tag":112,"props":180,"children":182},{"className":181},[],[183],{"type":47,"value":184},"wait.*",{"type":47,"value":186}," calls",{"type":41,"tag":67,"props":188,"children":189},{},[190,195,197,203],{"type":41,"tag":106,"props":191,"children":192},{},[193],{"type":47,"value":194},"Export tasks",{"type":47,"value":196}," from files in your ",{"type":41,"tag":112,"props":198,"children":200},{"className":199},[],[201],{"type":47,"value":202},"trigger\u002F",{"type":47,"value":204}," directory",{"type":41,"tag":56,"props":206,"children":208},{"id":207},"basic-task",[209],{"type":47,"value":210},"Basic Task",{"type":41,"tag":212,"props":213,"children":218},"pre",{"className":214,"code":215,"language":216,"meta":217,"style":217},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { task } from \"@trigger.dev\u002Fsdk\";\n\nexport const processData = task({\n  id: \"process-data\",\n  retry: {\n    maxAttempts: 10,\n    factor: 1.8,\n    minTimeoutInMs: 500,\n    maxTimeoutInMs: 30_000,\n  },\n  run: async (payload: { userId: string; data: any[] }) => {\n    console.log(`Processing ${payload.data.length} items`);\n    return { processed: payload.data.length };\n  },\n});\n","ts","",[219],{"type":41,"tag":112,"props":220,"children":221},{"__ignoreMap":217},[222,276,286,326,359,376,399,421,443,465,474,564,647,695,703],{"type":41,"tag":223,"props":224,"children":227},"span",{"class":225,"line":226},"line",1,[228,234,240,246,251,256,261,266,271],{"type":41,"tag":223,"props":229,"children":231},{"style":230},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[232],{"type":47,"value":233},"import",{"type":41,"tag":223,"props":235,"children":237},{"style":236},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[238],{"type":47,"value":239}," {",{"type":41,"tag":223,"props":241,"children":243},{"style":242},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[244],{"type":47,"value":245}," task",{"type":41,"tag":223,"props":247,"children":248},{"style":236},[249],{"type":47,"value":250}," }",{"type":41,"tag":223,"props":252,"children":253},{"style":230},[254],{"type":47,"value":255}," from",{"type":41,"tag":223,"props":257,"children":258},{"style":236},[259],{"type":47,"value":260}," \"",{"type":41,"tag":223,"props":262,"children":264},{"style":263},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[265],{"type":47,"value":117},{"type":41,"tag":223,"props":267,"children":268},{"style":236},[269],{"type":47,"value":270},"\"",{"type":41,"tag":223,"props":272,"children":273},{"style":236},[274],{"type":47,"value":275},";\n",{"type":41,"tag":223,"props":277,"children":279},{"class":225,"line":278},2,[280],{"type":41,"tag":223,"props":281,"children":283},{"emptyLinePlaceholder":282},true,[284],{"type":47,"value":285},"\n",{"type":41,"tag":223,"props":287,"children":289},{"class":225,"line":288},3,[290,295,301,306,311,316,321],{"type":41,"tag":223,"props":291,"children":292},{"style":230},[293],{"type":47,"value":294},"export",{"type":41,"tag":223,"props":296,"children":298},{"style":297},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[299],{"type":47,"value":300}," const",{"type":41,"tag":223,"props":302,"children":303},{"style":242},[304],{"type":47,"value":305}," processData ",{"type":41,"tag":223,"props":307,"children":308},{"style":236},[309],{"type":47,"value":310},"=",{"type":41,"tag":223,"props":312,"children":314},{"style":313},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[315],{"type":47,"value":245},{"type":41,"tag":223,"props":317,"children":318},{"style":242},[319],{"type":47,"value":320},"(",{"type":41,"tag":223,"props":322,"children":323},{"style":236},[324],{"type":47,"value":325},"{\n",{"type":41,"tag":223,"props":327,"children":329},{"class":225,"line":328},4,[330,336,341,345,350,354],{"type":41,"tag":223,"props":331,"children":333},{"style":332},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[334],{"type":47,"value":335},"  id",{"type":41,"tag":223,"props":337,"children":338},{"style":236},[339],{"type":47,"value":340},":",{"type":41,"tag":223,"props":342,"children":343},{"style":236},[344],{"type":47,"value":260},{"type":41,"tag":223,"props":346,"children":347},{"style":263},[348],{"type":47,"value":349},"process-data",{"type":41,"tag":223,"props":351,"children":352},{"style":236},[353],{"type":47,"value":270},{"type":41,"tag":223,"props":355,"children":356},{"style":236},[357],{"type":47,"value":358},",\n",{"type":41,"tag":223,"props":360,"children":361},{"class":225,"line":28},[362,367,371],{"type":41,"tag":223,"props":363,"children":364},{"style":332},[365],{"type":47,"value":366},"  retry",{"type":41,"tag":223,"props":368,"children":369},{"style":236},[370],{"type":47,"value":340},{"type":41,"tag":223,"props":372,"children":373},{"style":236},[374],{"type":47,"value":375}," {\n",{"type":41,"tag":223,"props":377,"children":379},{"class":225,"line":378},6,[380,385,389,395],{"type":41,"tag":223,"props":381,"children":382},{"style":332},[383],{"type":47,"value":384},"    maxAttempts",{"type":41,"tag":223,"props":386,"children":387},{"style":236},[388],{"type":47,"value":340},{"type":41,"tag":223,"props":390,"children":392},{"style":391},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[393],{"type":47,"value":394}," 10",{"type":41,"tag":223,"props":396,"children":397},{"style":236},[398],{"type":47,"value":358},{"type":41,"tag":223,"props":400,"children":402},{"class":225,"line":401},7,[403,408,412,417],{"type":41,"tag":223,"props":404,"children":405},{"style":332},[406],{"type":47,"value":407},"    factor",{"type":41,"tag":223,"props":409,"children":410},{"style":236},[411],{"type":47,"value":340},{"type":41,"tag":223,"props":413,"children":414},{"style":391},[415],{"type":47,"value":416}," 1.8",{"type":41,"tag":223,"props":418,"children":419},{"style":236},[420],{"type":47,"value":358},{"type":41,"tag":223,"props":422,"children":424},{"class":225,"line":423},8,[425,430,434,439],{"type":41,"tag":223,"props":426,"children":427},{"style":332},[428],{"type":47,"value":429},"    minTimeoutInMs",{"type":41,"tag":223,"props":431,"children":432},{"style":236},[433],{"type":47,"value":340},{"type":41,"tag":223,"props":435,"children":436},{"style":391},[437],{"type":47,"value":438}," 500",{"type":41,"tag":223,"props":440,"children":441},{"style":236},[442],{"type":47,"value":358},{"type":41,"tag":223,"props":444,"children":446},{"class":225,"line":445},9,[447,452,456,461],{"type":41,"tag":223,"props":448,"children":449},{"style":332},[450],{"type":47,"value":451},"    maxTimeoutInMs",{"type":41,"tag":223,"props":453,"children":454},{"style":236},[455],{"type":47,"value":340},{"type":41,"tag":223,"props":457,"children":458},{"style":391},[459],{"type":47,"value":460}," 30_000",{"type":41,"tag":223,"props":462,"children":463},{"style":236},[464],{"type":47,"value":358},{"type":41,"tag":223,"props":466,"children":468},{"class":225,"line":467},10,[469],{"type":41,"tag":223,"props":470,"children":471},{"style":236},[472],{"type":47,"value":473},"  },\n",{"type":41,"tag":223,"props":475,"children":477},{"class":225,"line":476},11,[478,483,487,492,497,503,507,511,516,520,526,531,536,540,545,550,555,560],{"type":41,"tag":223,"props":479,"children":480},{"style":313},[481],{"type":47,"value":482},"  run",{"type":41,"tag":223,"props":484,"children":485},{"style":236},[486],{"type":47,"value":340},{"type":41,"tag":223,"props":488,"children":489},{"style":297},[490],{"type":47,"value":491}," async",{"type":41,"tag":223,"props":493,"children":494},{"style":236},[495],{"type":47,"value":496}," (",{"type":41,"tag":223,"props":498,"children":500},{"style":499},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[501],{"type":47,"value":502},"payload",{"type":41,"tag":223,"props":504,"children":505},{"style":236},[506],{"type":47,"value":340},{"type":41,"tag":223,"props":508,"children":509},{"style":236},[510],{"type":47,"value":239},{"type":41,"tag":223,"props":512,"children":513},{"style":332},[514],{"type":47,"value":515}," userId",{"type":41,"tag":223,"props":517,"children":518},{"style":236},[519],{"type":47,"value":340},{"type":41,"tag":223,"props":521,"children":523},{"style":522},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[524],{"type":47,"value":525}," string",{"type":41,"tag":223,"props":527,"children":528},{"style":236},[529],{"type":47,"value":530},";",{"type":41,"tag":223,"props":532,"children":533},{"style":332},[534],{"type":47,"value":535}," data",{"type":41,"tag":223,"props":537,"children":538},{"style":236},[539],{"type":47,"value":340},{"type":41,"tag":223,"props":541,"children":542},{"style":522},[543],{"type":47,"value":544}," any",{"type":41,"tag":223,"props":546,"children":547},{"style":242},[548],{"type":47,"value":549},"[] ",{"type":41,"tag":223,"props":551,"children":552},{"style":236},[553],{"type":47,"value":554},"})",{"type":41,"tag":223,"props":556,"children":557},{"style":297},[558],{"type":47,"value":559}," =>",{"type":41,"tag":223,"props":561,"children":562},{"style":236},[563],{"type":47,"value":375},{"type":41,"tag":223,"props":565,"children":567},{"class":225,"line":566},12,[568,573,578,583,587,592,597,602,606,610,615,619,624,629,634,638,643],{"type":41,"tag":223,"props":569,"children":570},{"style":242},[571],{"type":47,"value":572},"    console",{"type":41,"tag":223,"props":574,"children":575},{"style":236},[576],{"type":47,"value":577},".",{"type":41,"tag":223,"props":579,"children":580},{"style":313},[581],{"type":47,"value":582},"log",{"type":41,"tag":223,"props":584,"children":585},{"style":332},[586],{"type":47,"value":320},{"type":41,"tag":223,"props":588,"children":589},{"style":236},[590],{"type":47,"value":591},"`",{"type":41,"tag":223,"props":593,"children":594},{"style":263},[595],{"type":47,"value":596},"Processing ",{"type":41,"tag":223,"props":598,"children":599},{"style":236},[600],{"type":47,"value":601},"${",{"type":41,"tag":223,"props":603,"children":604},{"style":242},[605],{"type":47,"value":502},{"type":41,"tag":223,"props":607,"children":608},{"style":236},[609],{"type":47,"value":577},{"type":41,"tag":223,"props":611,"children":612},{"style":242},[613],{"type":47,"value":614},"data",{"type":41,"tag":223,"props":616,"children":617},{"style":236},[618],{"type":47,"value":577},{"type":41,"tag":223,"props":620,"children":621},{"style":242},[622],{"type":47,"value":623},"length",{"type":41,"tag":223,"props":625,"children":626},{"style":236},[627],{"type":47,"value":628},"}",{"type":41,"tag":223,"props":630,"children":631},{"style":263},[632],{"type":47,"value":633}," items",{"type":41,"tag":223,"props":635,"children":636},{"style":236},[637],{"type":47,"value":591},{"type":41,"tag":223,"props":639,"children":640},{"style":332},[641],{"type":47,"value":642},")",{"type":41,"tag":223,"props":644,"children":645},{"style":236},[646],{"type":47,"value":275},{"type":41,"tag":223,"props":648,"children":650},{"class":225,"line":649},13,[651,656,660,665,669,674,678,682,686,690],{"type":41,"tag":223,"props":652,"children":653},{"style":230},[654],{"type":47,"value":655},"    return",{"type":41,"tag":223,"props":657,"children":658},{"style":236},[659],{"type":47,"value":239},{"type":41,"tag":223,"props":661,"children":662},{"style":332},[663],{"type":47,"value":664}," processed",{"type":41,"tag":223,"props":666,"children":667},{"style":236},[668],{"type":47,"value":340},{"type":41,"tag":223,"props":670,"children":671},{"style":242},[672],{"type":47,"value":673}," payload",{"type":41,"tag":223,"props":675,"children":676},{"style":236},[677],{"type":47,"value":577},{"type":41,"tag":223,"props":679,"children":680},{"style":242},[681],{"type":47,"value":614},{"type":41,"tag":223,"props":683,"children":684},{"style":236},[685],{"type":47,"value":577},{"type":41,"tag":223,"props":687,"children":688},{"style":242},[689],{"type":47,"value":623},{"type":41,"tag":223,"props":691,"children":692},{"style":236},[693],{"type":47,"value":694}," };\n",{"type":41,"tag":223,"props":696,"children":698},{"class":225,"line":697},14,[699],{"type":41,"tag":223,"props":700,"children":701},{"style":236},[702],{"type":47,"value":473},{"type":41,"tag":223,"props":704,"children":706},{"class":225,"line":705},15,[707,711,715],{"type":41,"tag":223,"props":708,"children":709},{"style":236},[710],{"type":47,"value":628},{"type":41,"tag":223,"props":712,"children":713},{"style":242},[714],{"type":47,"value":642},{"type":41,"tag":223,"props":716,"children":717},{"style":236},[718],{"type":47,"value":275},{"type":41,"tag":56,"props":720,"children":722},{"id":721},"schema-task-validated-input",[723],{"type":47,"value":724},"Schema Task (Validated Input)",{"type":41,"tag":212,"props":726,"children":728},{"className":214,"code":727,"language":216,"meta":217,"style":217},"import { schemaTask } from \"@trigger.dev\u002Fsdk\";\nimport { z } from \"zod\";\n\nexport const validatedTask = schemaTask({\n  id: \"validated-task\",\n  schema: z.object({\n    name: z.string(),\n    email: z.string().email(),\n  }),\n  run: async (payload) => {\n    \u002F\u002F payload is typed and validated\n    return { message: `Hello ${payload.name}` };\n  },\n});\n",[729],{"type":41,"tag":112,"props":730,"children":731},{"__ignoreMap":217},[732,772,813,820,852,880,913,947,992,1008,1043,1052,1108,1115],{"type":41,"tag":223,"props":733,"children":734},{"class":225,"line":226},[735,739,743,748,752,756,760,764,768],{"type":41,"tag":223,"props":736,"children":737},{"style":230},[738],{"type":47,"value":233},{"type":41,"tag":223,"props":740,"children":741},{"style":236},[742],{"type":47,"value":239},{"type":41,"tag":223,"props":744,"children":745},{"style":242},[746],{"type":47,"value":747}," schemaTask",{"type":41,"tag":223,"props":749,"children":750},{"style":236},[751],{"type":47,"value":250},{"type":41,"tag":223,"props":753,"children":754},{"style":230},[755],{"type":47,"value":255},{"type":41,"tag":223,"props":757,"children":758},{"style":236},[759],{"type":47,"value":260},{"type":41,"tag":223,"props":761,"children":762},{"style":263},[763],{"type":47,"value":117},{"type":41,"tag":223,"props":765,"children":766},{"style":236},[767],{"type":47,"value":270},{"type":41,"tag":223,"props":769,"children":770},{"style":236},[771],{"type":47,"value":275},{"type":41,"tag":223,"props":773,"children":774},{"class":225,"line":278},[775,779,783,788,792,796,800,805,809],{"type":41,"tag":223,"props":776,"children":777},{"style":230},[778],{"type":47,"value":233},{"type":41,"tag":223,"props":780,"children":781},{"style":236},[782],{"type":47,"value":239},{"type":41,"tag":223,"props":784,"children":785},{"style":242},[786],{"type":47,"value":787}," z",{"type":41,"tag":223,"props":789,"children":790},{"style":236},[791],{"type":47,"value":250},{"type":41,"tag":223,"props":793,"children":794},{"style":230},[795],{"type":47,"value":255},{"type":41,"tag":223,"props":797,"children":798},{"style":236},[799],{"type":47,"value":260},{"type":41,"tag":223,"props":801,"children":802},{"style":263},[803],{"type":47,"value":804},"zod",{"type":41,"tag":223,"props":806,"children":807},{"style":236},[808],{"type":47,"value":270},{"type":41,"tag":223,"props":810,"children":811},{"style":236},[812],{"type":47,"value":275},{"type":41,"tag":223,"props":814,"children":815},{"class":225,"line":288},[816],{"type":41,"tag":223,"props":817,"children":818},{"emptyLinePlaceholder":282},[819],{"type":47,"value":285},{"type":41,"tag":223,"props":821,"children":822},{"class":225,"line":328},[823,827,831,836,840,844,848],{"type":41,"tag":223,"props":824,"children":825},{"style":230},[826],{"type":47,"value":294},{"type":41,"tag":223,"props":828,"children":829},{"style":297},[830],{"type":47,"value":300},{"type":41,"tag":223,"props":832,"children":833},{"style":242},[834],{"type":47,"value":835}," validatedTask ",{"type":41,"tag":223,"props":837,"children":838},{"style":236},[839],{"type":47,"value":310},{"type":41,"tag":223,"props":841,"children":842},{"style":313},[843],{"type":47,"value":747},{"type":41,"tag":223,"props":845,"children":846},{"style":242},[847],{"type":47,"value":320},{"type":41,"tag":223,"props":849,"children":850},{"style":236},[851],{"type":47,"value":325},{"type":41,"tag":223,"props":853,"children":854},{"class":225,"line":28},[855,859,863,867,872,876],{"type":41,"tag":223,"props":856,"children":857},{"style":332},[858],{"type":47,"value":335},{"type":41,"tag":223,"props":860,"children":861},{"style":236},[862],{"type":47,"value":340},{"type":41,"tag":223,"props":864,"children":865},{"style":236},[866],{"type":47,"value":260},{"type":41,"tag":223,"props":868,"children":869},{"style":263},[870],{"type":47,"value":871},"validated-task",{"type":41,"tag":223,"props":873,"children":874},{"style":236},[875],{"type":47,"value":270},{"type":41,"tag":223,"props":877,"children":878},{"style":236},[879],{"type":47,"value":358},{"type":41,"tag":223,"props":881,"children":882},{"class":225,"line":378},[883,888,892,896,900,905,909],{"type":41,"tag":223,"props":884,"children":885},{"style":332},[886],{"type":47,"value":887},"  schema",{"type":41,"tag":223,"props":889,"children":890},{"style":236},[891],{"type":47,"value":340},{"type":41,"tag":223,"props":893,"children":894},{"style":242},[895],{"type":47,"value":787},{"type":41,"tag":223,"props":897,"children":898},{"style":236},[899],{"type":47,"value":577},{"type":41,"tag":223,"props":901,"children":902},{"style":313},[903],{"type":47,"value":904},"object",{"type":41,"tag":223,"props":906,"children":907},{"style":242},[908],{"type":47,"value":320},{"type":41,"tag":223,"props":910,"children":911},{"style":236},[912],{"type":47,"value":325},{"type":41,"tag":223,"props":914,"children":915},{"class":225,"line":401},[916,921,925,929,933,938,943],{"type":41,"tag":223,"props":917,"children":918},{"style":332},[919],{"type":47,"value":920},"    name",{"type":41,"tag":223,"props":922,"children":923},{"style":236},[924],{"type":47,"value":340},{"type":41,"tag":223,"props":926,"children":927},{"style":242},[928],{"type":47,"value":787},{"type":41,"tag":223,"props":930,"children":931},{"style":236},[932],{"type":47,"value":577},{"type":41,"tag":223,"props":934,"children":935},{"style":313},[936],{"type":47,"value":937},"string",{"type":41,"tag":223,"props":939,"children":940},{"style":242},[941],{"type":47,"value":942},"()",{"type":41,"tag":223,"props":944,"children":945},{"style":236},[946],{"type":47,"value":358},{"type":41,"tag":223,"props":948,"children":949},{"class":225,"line":423},[950,955,959,963,967,971,975,979,984,988],{"type":41,"tag":223,"props":951,"children":952},{"style":332},[953],{"type":47,"value":954},"    email",{"type":41,"tag":223,"props":956,"children":957},{"style":236},[958],{"type":47,"value":340},{"type":41,"tag":223,"props":960,"children":961},{"style":242},[962],{"type":47,"value":787},{"type":41,"tag":223,"props":964,"children":965},{"style":236},[966],{"type":47,"value":577},{"type":41,"tag":223,"props":968,"children":969},{"style":313},[970],{"type":47,"value":937},{"type":41,"tag":223,"props":972,"children":973},{"style":242},[974],{"type":47,"value":942},{"type":41,"tag":223,"props":976,"children":977},{"style":236},[978],{"type":47,"value":577},{"type":41,"tag":223,"props":980,"children":981},{"style":313},[982],{"type":47,"value":983},"email",{"type":41,"tag":223,"props":985,"children":986},{"style":242},[987],{"type":47,"value":942},{"type":41,"tag":223,"props":989,"children":990},{"style":236},[991],{"type":47,"value":358},{"type":41,"tag":223,"props":993,"children":994},{"class":225,"line":445},[995,1000,1004],{"type":41,"tag":223,"props":996,"children":997},{"style":236},[998],{"type":47,"value":999},"  }",{"type":41,"tag":223,"props":1001,"children":1002},{"style":242},[1003],{"type":47,"value":642},{"type":41,"tag":223,"props":1005,"children":1006},{"style":236},[1007],{"type":47,"value":358},{"type":41,"tag":223,"props":1009,"children":1010},{"class":225,"line":467},[1011,1015,1019,1023,1027,1031,1035,1039],{"type":41,"tag":223,"props":1012,"children":1013},{"style":313},[1014],{"type":47,"value":482},{"type":41,"tag":223,"props":1016,"children":1017},{"style":236},[1018],{"type":47,"value":340},{"type":41,"tag":223,"props":1020,"children":1021},{"style":297},[1022],{"type":47,"value":491},{"type":41,"tag":223,"props":1024,"children":1025},{"style":236},[1026],{"type":47,"value":496},{"type":41,"tag":223,"props":1028,"children":1029},{"style":499},[1030],{"type":47,"value":502},{"type":41,"tag":223,"props":1032,"children":1033},{"style":236},[1034],{"type":47,"value":642},{"type":41,"tag":223,"props":1036,"children":1037},{"style":297},[1038],{"type":47,"value":559},{"type":41,"tag":223,"props":1040,"children":1041},{"style":236},[1042],{"type":47,"value":375},{"type":41,"tag":223,"props":1044,"children":1045},{"class":225,"line":476},[1046],{"type":41,"tag":223,"props":1047,"children":1049},{"style":1048},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1050],{"type":47,"value":1051},"    \u002F\u002F payload is typed and validated\n",{"type":41,"tag":223,"props":1053,"children":1054},{"class":225,"line":566},[1055,1059,1063,1068,1072,1077,1082,1086,1090,1094,1099,1104],{"type":41,"tag":223,"props":1056,"children":1057},{"style":230},[1058],{"type":47,"value":655},{"type":41,"tag":223,"props":1060,"children":1061},{"style":236},[1062],{"type":47,"value":239},{"type":41,"tag":223,"props":1064,"children":1065},{"style":332},[1066],{"type":47,"value":1067}," message",{"type":41,"tag":223,"props":1069,"children":1070},{"style":236},[1071],{"type":47,"value":340},{"type":41,"tag":223,"props":1073,"children":1074},{"style":236},[1075],{"type":47,"value":1076}," `",{"type":41,"tag":223,"props":1078,"children":1079},{"style":263},[1080],{"type":47,"value":1081},"Hello ",{"type":41,"tag":223,"props":1083,"children":1084},{"style":236},[1085],{"type":47,"value":601},{"type":41,"tag":223,"props":1087,"children":1088},{"style":242},[1089],{"type":47,"value":502},{"type":41,"tag":223,"props":1091,"children":1092},{"style":236},[1093],{"type":47,"value":577},{"type":41,"tag":223,"props":1095,"children":1096},{"style":242},[1097],{"type":47,"value":1098},"name",{"type":41,"tag":223,"props":1100,"children":1101},{"style":236},[1102],{"type":47,"value":1103},"}`",{"type":41,"tag":223,"props":1105,"children":1106},{"style":236},[1107],{"type":47,"value":694},{"type":41,"tag":223,"props":1109,"children":1110},{"class":225,"line":649},[1111],{"type":41,"tag":223,"props":1112,"children":1113},{"style":236},[1114],{"type":47,"value":473},{"type":41,"tag":223,"props":1116,"children":1117},{"class":225,"line":697},[1118,1122,1126],{"type":41,"tag":223,"props":1119,"children":1120},{"style":236},[1121],{"type":47,"value":628},{"type":41,"tag":223,"props":1123,"children":1124},{"style":242},[1125],{"type":47,"value":642},{"type":41,"tag":223,"props":1127,"children":1128},{"style":236},[1129],{"type":47,"value":275},{"type":41,"tag":56,"props":1131,"children":1133},{"id":1132},"triggering-tasks",[1134],{"type":47,"value":1135},"Triggering Tasks",{"type":41,"tag":1137,"props":1138,"children":1140},"h3",{"id":1139},"from-backend-code",[1141],{"type":47,"value":1142},"From Backend Code",{"type":41,"tag":212,"props":1144,"children":1146},{"className":214,"code":1145,"language":216,"meta":217,"style":217},"import { tasks } from \"@trigger.dev\u002Fsdk\";\nimport type { processData } from \".\u002Ftrigger\u002Ftasks\";\n\n\u002F\u002F Single trigger (fire and forget)\nconst handle = await tasks.trigger\u003Ctypeof processData>(\"process-data\", {\n  userId: \"123\",\n  data: [{ id: 1 }],\n});\n\n\u002F\u002F Batch trigger (up to 1,000 items, 3MB per payload)\nconst batchHandle = await tasks.batchTrigger\u003Ctypeof processData>(\"process-data\", [\n  { payload: { userId: \"123\", data: [] } },\n  { payload: { userId: \"456\", data: [] } },\n]);\n",[1147],{"type":41,"tag":112,"props":1148,"children":1149},{"__ignoreMap":217},[1150,1190,1236,1243,1251,1325,1354,1403,1418,1425,1433,1503,1569,1633],{"type":41,"tag":223,"props":1151,"children":1152},{"class":225,"line":226},[1153,1157,1161,1166,1170,1174,1178,1182,1186],{"type":41,"tag":223,"props":1154,"children":1155},{"style":230},[1156],{"type":47,"value":233},{"type":41,"tag":223,"props":1158,"children":1159},{"style":236},[1160],{"type":47,"value":239},{"type":41,"tag":223,"props":1162,"children":1163},{"style":242},[1164],{"type":47,"value":1165}," tasks",{"type":41,"tag":223,"props":1167,"children":1168},{"style":236},[1169],{"type":47,"value":250},{"type":41,"tag":223,"props":1171,"children":1172},{"style":230},[1173],{"type":47,"value":255},{"type":41,"tag":223,"props":1175,"children":1176},{"style":236},[1177],{"type":47,"value":260},{"type":41,"tag":223,"props":1179,"children":1180},{"style":263},[1181],{"type":47,"value":117},{"type":41,"tag":223,"props":1183,"children":1184},{"style":236},[1185],{"type":47,"value":270},{"type":41,"tag":223,"props":1187,"children":1188},{"style":236},[1189],{"type":47,"value":275},{"type":41,"tag":223,"props":1191,"children":1192},{"class":225,"line":278},[1193,1197,1202,1206,1211,1215,1219,1223,1228,1232],{"type":41,"tag":223,"props":1194,"children":1195},{"style":230},[1196],{"type":47,"value":233},{"type":41,"tag":223,"props":1198,"children":1199},{"style":230},[1200],{"type":47,"value":1201}," type",{"type":41,"tag":223,"props":1203,"children":1204},{"style":236},[1205],{"type":47,"value":239},{"type":41,"tag":223,"props":1207,"children":1208},{"style":242},[1209],{"type":47,"value":1210}," processData",{"type":41,"tag":223,"props":1212,"children":1213},{"style":236},[1214],{"type":47,"value":250},{"type":41,"tag":223,"props":1216,"children":1217},{"style":230},[1218],{"type":47,"value":255},{"type":41,"tag":223,"props":1220,"children":1221},{"style":236},[1222],{"type":47,"value":260},{"type":41,"tag":223,"props":1224,"children":1225},{"style":263},[1226],{"type":47,"value":1227},".\u002Ftrigger\u002Ftasks",{"type":41,"tag":223,"props":1229,"children":1230},{"style":236},[1231],{"type":47,"value":270},{"type":41,"tag":223,"props":1233,"children":1234},{"style":236},[1235],{"type":47,"value":275},{"type":41,"tag":223,"props":1237,"children":1238},{"class":225,"line":288},[1239],{"type":41,"tag":223,"props":1240,"children":1241},{"emptyLinePlaceholder":282},[1242],{"type":47,"value":285},{"type":41,"tag":223,"props":1244,"children":1245},{"class":225,"line":328},[1246],{"type":41,"tag":223,"props":1247,"children":1248},{"style":1048},[1249],{"type":47,"value":1250},"\u002F\u002F Single trigger (fire and forget)\n",{"type":41,"tag":223,"props":1252,"children":1253},{"class":225,"line":28},[1254,1259,1264,1268,1273,1277,1281,1286,1291,1295,1300,1304,1308,1312,1316,1321],{"type":41,"tag":223,"props":1255,"children":1256},{"style":297},[1257],{"type":47,"value":1258},"const",{"type":41,"tag":223,"props":1260,"children":1261},{"style":242},[1262],{"type":47,"value":1263}," handle ",{"type":41,"tag":223,"props":1265,"children":1266},{"style":236},[1267],{"type":47,"value":310},{"type":41,"tag":223,"props":1269,"children":1270},{"style":230},[1271],{"type":47,"value":1272}," await",{"type":41,"tag":223,"props":1274,"children":1275},{"style":242},[1276],{"type":47,"value":1165},{"type":41,"tag":223,"props":1278,"children":1279},{"style":236},[1280],{"type":47,"value":577},{"type":41,"tag":223,"props":1282,"children":1283},{"style":313},[1284],{"type":47,"value":1285},"trigger",{"type":41,"tag":223,"props":1287,"children":1288},{"style":236},[1289],{"type":47,"value":1290},"\u003Ctypeof",{"type":41,"tag":223,"props":1292,"children":1293},{"style":242},[1294],{"type":47,"value":1210},{"type":41,"tag":223,"props":1296,"children":1297},{"style":236},[1298],{"type":47,"value":1299},">",{"type":41,"tag":223,"props":1301,"children":1302},{"style":242},[1303],{"type":47,"value":320},{"type":41,"tag":223,"props":1305,"children":1306},{"style":236},[1307],{"type":47,"value":270},{"type":41,"tag":223,"props":1309,"children":1310},{"style":263},[1311],{"type":47,"value":349},{"type":41,"tag":223,"props":1313,"children":1314},{"style":236},[1315],{"type":47,"value":270},{"type":41,"tag":223,"props":1317,"children":1318},{"style":236},[1319],{"type":47,"value":1320},",",{"type":41,"tag":223,"props":1322,"children":1323},{"style":236},[1324],{"type":47,"value":375},{"type":41,"tag":223,"props":1326,"children":1327},{"class":225,"line":378},[1328,1333,1337,1341,1346,1350],{"type":41,"tag":223,"props":1329,"children":1330},{"style":332},[1331],{"type":47,"value":1332},"  userId",{"type":41,"tag":223,"props":1334,"children":1335},{"style":236},[1336],{"type":47,"value":340},{"type":41,"tag":223,"props":1338,"children":1339},{"style":236},[1340],{"type":47,"value":260},{"type":41,"tag":223,"props":1342,"children":1343},{"style":263},[1344],{"type":47,"value":1345},"123",{"type":41,"tag":223,"props":1347,"children":1348},{"style":236},[1349],{"type":47,"value":270},{"type":41,"tag":223,"props":1351,"children":1352},{"style":236},[1353],{"type":47,"value":358},{"type":41,"tag":223,"props":1355,"children":1356},{"class":225,"line":401},[1357,1362,1366,1371,1376,1381,1385,1390,1394,1399],{"type":41,"tag":223,"props":1358,"children":1359},{"style":332},[1360],{"type":47,"value":1361},"  data",{"type":41,"tag":223,"props":1363,"children":1364},{"style":236},[1365],{"type":47,"value":340},{"type":41,"tag":223,"props":1367,"children":1368},{"style":242},[1369],{"type":47,"value":1370}," [",{"type":41,"tag":223,"props":1372,"children":1373},{"style":236},[1374],{"type":47,"value":1375},"{",{"type":41,"tag":223,"props":1377,"children":1378},{"style":332},[1379],{"type":47,"value":1380}," id",{"type":41,"tag":223,"props":1382,"children":1383},{"style":236},[1384],{"type":47,"value":340},{"type":41,"tag":223,"props":1386,"children":1387},{"style":391},[1388],{"type":47,"value":1389}," 1",{"type":41,"tag":223,"props":1391,"children":1392},{"style":236},[1393],{"type":47,"value":250},{"type":41,"tag":223,"props":1395,"children":1396},{"style":242},[1397],{"type":47,"value":1398},"]",{"type":41,"tag":223,"props":1400,"children":1401},{"style":236},[1402],{"type":47,"value":358},{"type":41,"tag":223,"props":1404,"children":1405},{"class":225,"line":423},[1406,1410,1414],{"type":41,"tag":223,"props":1407,"children":1408},{"style":236},[1409],{"type":47,"value":628},{"type":41,"tag":223,"props":1411,"children":1412},{"style":242},[1413],{"type":47,"value":642},{"type":41,"tag":223,"props":1415,"children":1416},{"style":236},[1417],{"type":47,"value":275},{"type":41,"tag":223,"props":1419,"children":1420},{"class":225,"line":445},[1421],{"type":41,"tag":223,"props":1422,"children":1423},{"emptyLinePlaceholder":282},[1424],{"type":47,"value":285},{"type":41,"tag":223,"props":1426,"children":1427},{"class":225,"line":467},[1428],{"type":41,"tag":223,"props":1429,"children":1430},{"style":1048},[1431],{"type":47,"value":1432},"\u002F\u002F Batch trigger (up to 1,000 items, 3MB per payload)\n",{"type":41,"tag":223,"props":1434,"children":1435},{"class":225,"line":476},[1436,1440,1445,1449,1453,1457,1461,1466,1470,1474,1478,1482,1486,1490,1494,1498],{"type":41,"tag":223,"props":1437,"children":1438},{"style":297},[1439],{"type":47,"value":1258},{"type":41,"tag":223,"props":1441,"children":1442},{"style":242},[1443],{"type":47,"value":1444}," batchHandle ",{"type":41,"tag":223,"props":1446,"children":1447},{"style":236},[1448],{"type":47,"value":310},{"type":41,"tag":223,"props":1450,"children":1451},{"style":230},[1452],{"type":47,"value":1272},{"type":41,"tag":223,"props":1454,"children":1455},{"style":242},[1456],{"type":47,"value":1165},{"type":41,"tag":223,"props":1458,"children":1459},{"style":236},[1460],{"type":47,"value":577},{"type":41,"tag":223,"props":1462,"children":1463},{"style":313},[1464],{"type":47,"value":1465},"batchTrigger",{"type":41,"tag":223,"props":1467,"children":1468},{"style":236},[1469],{"type":47,"value":1290},{"type":41,"tag":223,"props":1471,"children":1472},{"style":242},[1473],{"type":47,"value":1210},{"type":41,"tag":223,"props":1475,"children":1476},{"style":236},[1477],{"type":47,"value":1299},{"type":41,"tag":223,"props":1479,"children":1480},{"style":242},[1481],{"type":47,"value":320},{"type":41,"tag":223,"props":1483,"children":1484},{"style":236},[1485],{"type":47,"value":270},{"type":41,"tag":223,"props":1487,"children":1488},{"style":263},[1489],{"type":47,"value":349},{"type":41,"tag":223,"props":1491,"children":1492},{"style":236},[1493],{"type":47,"value":270},{"type":41,"tag":223,"props":1495,"children":1496},{"style":236},[1497],{"type":47,"value":1320},{"type":41,"tag":223,"props":1499,"children":1500},{"style":242},[1501],{"type":47,"value":1502}," [\n",{"type":41,"tag":223,"props":1504,"children":1505},{"class":225,"line":566},[1506,1511,1515,1519,1523,1527,1531,1535,1539,1543,1547,1551,1555,1560,1564],{"type":41,"tag":223,"props":1507,"children":1508},{"style":236},[1509],{"type":47,"value":1510},"  {",{"type":41,"tag":223,"props":1512,"children":1513},{"style":332},[1514],{"type":47,"value":673},{"type":41,"tag":223,"props":1516,"children":1517},{"style":236},[1518],{"type":47,"value":340},{"type":41,"tag":223,"props":1520,"children":1521},{"style":236},[1522],{"type":47,"value":239},{"type":41,"tag":223,"props":1524,"children":1525},{"style":332},[1526],{"type":47,"value":515},{"type":41,"tag":223,"props":1528,"children":1529},{"style":236},[1530],{"type":47,"value":340},{"type":41,"tag":223,"props":1532,"children":1533},{"style":236},[1534],{"type":47,"value":260},{"type":41,"tag":223,"props":1536,"children":1537},{"style":263},[1538],{"type":47,"value":1345},{"type":41,"tag":223,"props":1540,"children":1541},{"style":236},[1542],{"type":47,"value":270},{"type":41,"tag":223,"props":1544,"children":1545},{"style":236},[1546],{"type":47,"value":1320},{"type":41,"tag":223,"props":1548,"children":1549},{"style":332},[1550],{"type":47,"value":535},{"type":41,"tag":223,"props":1552,"children":1553},{"style":236},[1554],{"type":47,"value":340},{"type":41,"tag":223,"props":1556,"children":1557},{"style":242},[1558],{"type":47,"value":1559}," [] ",{"type":41,"tag":223,"props":1561,"children":1562},{"style":236},[1563],{"type":47,"value":628},{"type":41,"tag":223,"props":1565,"children":1566},{"style":236},[1567],{"type":47,"value":1568}," },\n",{"type":41,"tag":223,"props":1570,"children":1571},{"class":225,"line":649},[1572,1576,1580,1584,1588,1592,1596,1600,1605,1609,1613,1617,1621,1625,1629],{"type":41,"tag":223,"props":1573,"children":1574},{"style":236},[1575],{"type":47,"value":1510},{"type":41,"tag":223,"props":1577,"children":1578},{"style":332},[1579],{"type":47,"value":673},{"type":41,"tag":223,"props":1581,"children":1582},{"style":236},[1583],{"type":47,"value":340},{"type":41,"tag":223,"props":1585,"children":1586},{"style":236},[1587],{"type":47,"value":239},{"type":41,"tag":223,"props":1589,"children":1590},{"style":332},[1591],{"type":47,"value":515},{"type":41,"tag":223,"props":1593,"children":1594},{"style":236},[1595],{"type":47,"value":340},{"type":41,"tag":223,"props":1597,"children":1598},{"style":236},[1599],{"type":47,"value":260},{"type":41,"tag":223,"props":1601,"children":1602},{"style":263},[1603],{"type":47,"value":1604},"456",{"type":41,"tag":223,"props":1606,"children":1607},{"style":236},[1608],{"type":47,"value":270},{"type":41,"tag":223,"props":1610,"children":1611},{"style":236},[1612],{"type":47,"value":1320},{"type":41,"tag":223,"props":1614,"children":1615},{"style":332},[1616],{"type":47,"value":535},{"type":41,"tag":223,"props":1618,"children":1619},{"style":236},[1620],{"type":47,"value":340},{"type":41,"tag":223,"props":1622,"children":1623},{"style":242},[1624],{"type":47,"value":1559},{"type":41,"tag":223,"props":1626,"children":1627},{"style":236},[1628],{"type":47,"value":628},{"type":41,"tag":223,"props":1630,"children":1631},{"style":236},[1632],{"type":47,"value":1568},{"type":41,"tag":223,"props":1634,"children":1635},{"class":225,"line":697},[1636,1641],{"type":41,"tag":223,"props":1637,"children":1638},{"style":242},[1639],{"type":47,"value":1640},"])",{"type":41,"tag":223,"props":1642,"children":1643},{"style":236},[1644],{"type":47,"value":275},{"type":41,"tag":1137,"props":1646,"children":1648},{"id":1647},"from-inside-tasks",[1649],{"type":47,"value":1650},"From Inside Tasks",{"type":41,"tag":212,"props":1652,"children":1654},{"className":214,"code":1653,"language":216,"meta":217,"style":217},"export const parentTask = task({\n  id: \"parent-task\",\n  run: async (payload) => {\n    \u002F\u002F Fire and forget\n    const handle = await childTask.trigger({ data: \"value\" });\n\n    \u002F\u002F Wait for result - returns Result object, NOT direct output\n    const result = await childTask.triggerAndWait({ data: \"value\" });\n    if (result.ok) {\n      console.log(\"Output:\", result.output);\n    } else {\n      console.error(\"Failed:\", result.error);\n    }\n\n    \u002F\u002F Quick unwrap (throws on error)\n    const output = await childTask.triggerAndWait({ data: \"value\" }).unwrap();\n\n    \u002F\u002F Batch with wait\n    const results = await childTask.batchTriggerAndWait([\n      { payload: { data: \"item1\" } },\n      { payload: { data: \"item2\" } },\n    ]);\n  },\n});\n",[1655],{"type":41,"tag":112,"props":1656,"children":1657},{"__ignoreMap":217},[1658,1690,1718,1753,1761,1837,1844,1852,1925,1960,2018,2035,2092,2100,2107,2115,2201,2209,2218,2257,2307,2356,2369,2377],{"type":41,"tag":223,"props":1659,"children":1660},{"class":225,"line":226},[1661,1665,1669,1674,1678,1682,1686],{"type":41,"tag":223,"props":1662,"children":1663},{"style":230},[1664],{"type":47,"value":294},{"type":41,"tag":223,"props":1666,"children":1667},{"style":297},[1668],{"type":47,"value":300},{"type":41,"tag":223,"props":1670,"children":1671},{"style":242},[1672],{"type":47,"value":1673}," parentTask ",{"type":41,"tag":223,"props":1675,"children":1676},{"style":236},[1677],{"type":47,"value":310},{"type":41,"tag":223,"props":1679,"children":1680},{"style":313},[1681],{"type":47,"value":245},{"type":41,"tag":223,"props":1683,"children":1684},{"style":242},[1685],{"type":47,"value":320},{"type":41,"tag":223,"props":1687,"children":1688},{"style":236},[1689],{"type":47,"value":325},{"type":41,"tag":223,"props":1691,"children":1692},{"class":225,"line":278},[1693,1697,1701,1705,1710,1714],{"type":41,"tag":223,"props":1694,"children":1695},{"style":332},[1696],{"type":47,"value":335},{"type":41,"tag":223,"props":1698,"children":1699},{"style":236},[1700],{"type":47,"value":340},{"type":41,"tag":223,"props":1702,"children":1703},{"style":236},[1704],{"type":47,"value":260},{"type":41,"tag":223,"props":1706,"children":1707},{"style":263},[1708],{"type":47,"value":1709},"parent-task",{"type":41,"tag":223,"props":1711,"children":1712},{"style":236},[1713],{"type":47,"value":270},{"type":41,"tag":223,"props":1715,"children":1716},{"style":236},[1717],{"type":47,"value":358},{"type":41,"tag":223,"props":1719,"children":1720},{"class":225,"line":288},[1721,1725,1729,1733,1737,1741,1745,1749],{"type":41,"tag":223,"props":1722,"children":1723},{"style":313},[1724],{"type":47,"value":482},{"type":41,"tag":223,"props":1726,"children":1727},{"style":236},[1728],{"type":47,"value":340},{"type":41,"tag":223,"props":1730,"children":1731},{"style":297},[1732],{"type":47,"value":491},{"type":41,"tag":223,"props":1734,"children":1735},{"style":236},[1736],{"type":47,"value":496},{"type":41,"tag":223,"props":1738,"children":1739},{"style":499},[1740],{"type":47,"value":502},{"type":41,"tag":223,"props":1742,"children":1743},{"style":236},[1744],{"type":47,"value":642},{"type":41,"tag":223,"props":1746,"children":1747},{"style":297},[1748],{"type":47,"value":559},{"type":41,"tag":223,"props":1750,"children":1751},{"style":236},[1752],{"type":47,"value":375},{"type":41,"tag":223,"props":1754,"children":1755},{"class":225,"line":328},[1756],{"type":41,"tag":223,"props":1757,"children":1758},{"style":1048},[1759],{"type":47,"value":1760},"    \u002F\u002F Fire and forget\n",{"type":41,"tag":223,"props":1762,"children":1763},{"class":225,"line":28},[1764,1769,1774,1779,1783,1788,1792,1796,1800,1804,1808,1812,1816,1821,1825,1829,1833],{"type":41,"tag":223,"props":1765,"children":1766},{"style":297},[1767],{"type":47,"value":1768},"    const",{"type":41,"tag":223,"props":1770,"children":1771},{"style":242},[1772],{"type":47,"value":1773}," handle",{"type":41,"tag":223,"props":1775,"children":1776},{"style":236},[1777],{"type":47,"value":1778}," =",{"type":41,"tag":223,"props":1780,"children":1781},{"style":230},[1782],{"type":47,"value":1272},{"type":41,"tag":223,"props":1784,"children":1785},{"style":242},[1786],{"type":47,"value":1787}," childTask",{"type":41,"tag":223,"props":1789,"children":1790},{"style":236},[1791],{"type":47,"value":577},{"type":41,"tag":223,"props":1793,"children":1794},{"style":313},[1795],{"type":47,"value":1285},{"type":41,"tag":223,"props":1797,"children":1798},{"style":332},[1799],{"type":47,"value":320},{"type":41,"tag":223,"props":1801,"children":1802},{"style":236},[1803],{"type":47,"value":1375},{"type":41,"tag":223,"props":1805,"children":1806},{"style":332},[1807],{"type":47,"value":535},{"type":41,"tag":223,"props":1809,"children":1810},{"style":236},[1811],{"type":47,"value":340},{"type":41,"tag":223,"props":1813,"children":1814},{"style":236},[1815],{"type":47,"value":260},{"type":41,"tag":223,"props":1817,"children":1818},{"style":263},[1819],{"type":47,"value":1820},"value",{"type":41,"tag":223,"props":1822,"children":1823},{"style":236},[1824],{"type":47,"value":270},{"type":41,"tag":223,"props":1826,"children":1827},{"style":236},[1828],{"type":47,"value":250},{"type":41,"tag":223,"props":1830,"children":1831},{"style":332},[1832],{"type":47,"value":642},{"type":41,"tag":223,"props":1834,"children":1835},{"style":236},[1836],{"type":47,"value":275},{"type":41,"tag":223,"props":1838,"children":1839},{"class":225,"line":378},[1840],{"type":41,"tag":223,"props":1841,"children":1842},{"emptyLinePlaceholder":282},[1843],{"type":47,"value":285},{"type":41,"tag":223,"props":1845,"children":1846},{"class":225,"line":401},[1847],{"type":41,"tag":223,"props":1848,"children":1849},{"style":1048},[1850],{"type":47,"value":1851},"    \u002F\u002F Wait for result - returns Result object, NOT direct output\n",{"type":41,"tag":223,"props":1853,"children":1854},{"class":225,"line":423},[1855,1859,1864,1868,1872,1876,1880,1885,1889,1893,1897,1901,1905,1909,1913,1917,1921],{"type":41,"tag":223,"props":1856,"children":1857},{"style":297},[1858],{"type":47,"value":1768},{"type":41,"tag":223,"props":1860,"children":1861},{"style":242},[1862],{"type":47,"value":1863}," result",{"type":41,"tag":223,"props":1865,"children":1866},{"style":236},[1867],{"type":47,"value":1778},{"type":41,"tag":223,"props":1869,"children":1870},{"style":230},[1871],{"type":47,"value":1272},{"type":41,"tag":223,"props":1873,"children":1874},{"style":242},[1875],{"type":47,"value":1787},{"type":41,"tag":223,"props":1877,"children":1878},{"style":236},[1879],{"type":47,"value":577},{"type":41,"tag":223,"props":1881,"children":1882},{"style":313},[1883],{"type":47,"value":1884},"triggerAndWait",{"type":41,"tag":223,"props":1886,"children":1887},{"style":332},[1888],{"type":47,"value":320},{"type":41,"tag":223,"props":1890,"children":1891},{"style":236},[1892],{"type":47,"value":1375},{"type":41,"tag":223,"props":1894,"children":1895},{"style":332},[1896],{"type":47,"value":535},{"type":41,"tag":223,"props":1898,"children":1899},{"style":236},[1900],{"type":47,"value":340},{"type":41,"tag":223,"props":1902,"children":1903},{"style":236},[1904],{"type":47,"value":260},{"type":41,"tag":223,"props":1906,"children":1907},{"style":263},[1908],{"type":47,"value":1820},{"type":41,"tag":223,"props":1910,"children":1911},{"style":236},[1912],{"type":47,"value":270},{"type":41,"tag":223,"props":1914,"children":1915},{"style":236},[1916],{"type":47,"value":250},{"type":41,"tag":223,"props":1918,"children":1919},{"style":332},[1920],{"type":47,"value":642},{"type":41,"tag":223,"props":1922,"children":1923},{"style":236},[1924],{"type":47,"value":275},{"type":41,"tag":223,"props":1926,"children":1927},{"class":225,"line":445},[1928,1933,1937,1942,1946,1951,1956],{"type":41,"tag":223,"props":1929,"children":1930},{"style":230},[1931],{"type":47,"value":1932},"    if",{"type":41,"tag":223,"props":1934,"children":1935},{"style":332},[1936],{"type":47,"value":496},{"type":41,"tag":223,"props":1938,"children":1939},{"style":242},[1940],{"type":47,"value":1941},"result",{"type":41,"tag":223,"props":1943,"children":1944},{"style":236},[1945],{"type":47,"value":577},{"type":41,"tag":223,"props":1947,"children":1948},{"style":242},[1949],{"type":47,"value":1950},"ok",{"type":41,"tag":223,"props":1952,"children":1953},{"style":332},[1954],{"type":47,"value":1955},") ",{"type":41,"tag":223,"props":1957,"children":1958},{"style":236},[1959],{"type":47,"value":325},{"type":41,"tag":223,"props":1961,"children":1962},{"class":225,"line":467},[1963,1968,1972,1976,1980,1984,1989,1993,1997,2001,2005,2010,2014],{"type":41,"tag":223,"props":1964,"children":1965},{"style":242},[1966],{"type":47,"value":1967},"      console",{"type":41,"tag":223,"props":1969,"children":1970},{"style":236},[1971],{"type":47,"value":577},{"type":41,"tag":223,"props":1973,"children":1974},{"style":313},[1975],{"type":47,"value":582},{"type":41,"tag":223,"props":1977,"children":1978},{"style":332},[1979],{"type":47,"value":320},{"type":41,"tag":223,"props":1981,"children":1982},{"style":236},[1983],{"type":47,"value":270},{"type":41,"tag":223,"props":1985,"children":1986},{"style":263},[1987],{"type":47,"value":1988},"Output:",{"type":41,"tag":223,"props":1990,"children":1991},{"style":236},[1992],{"type":47,"value":270},{"type":41,"tag":223,"props":1994,"children":1995},{"style":236},[1996],{"type":47,"value":1320},{"type":41,"tag":223,"props":1998,"children":1999},{"style":242},[2000],{"type":47,"value":1863},{"type":41,"tag":223,"props":2002,"children":2003},{"style":236},[2004],{"type":47,"value":577},{"type":41,"tag":223,"props":2006,"children":2007},{"style":242},[2008],{"type":47,"value":2009},"output",{"type":41,"tag":223,"props":2011,"children":2012},{"style":332},[2013],{"type":47,"value":642},{"type":41,"tag":223,"props":2015,"children":2016},{"style":236},[2017],{"type":47,"value":275},{"type":41,"tag":223,"props":2019,"children":2020},{"class":225,"line":476},[2021,2026,2031],{"type":41,"tag":223,"props":2022,"children":2023},{"style":236},[2024],{"type":47,"value":2025},"    }",{"type":41,"tag":223,"props":2027,"children":2028},{"style":230},[2029],{"type":47,"value":2030}," else",{"type":41,"tag":223,"props":2032,"children":2033},{"style":236},[2034],{"type":47,"value":375},{"type":41,"tag":223,"props":2036,"children":2037},{"class":225,"line":566},[2038,2042,2046,2051,2055,2059,2064,2068,2072,2076,2080,2084,2088],{"type":41,"tag":223,"props":2039,"children":2040},{"style":242},[2041],{"type":47,"value":1967},{"type":41,"tag":223,"props":2043,"children":2044},{"style":236},[2045],{"type":47,"value":577},{"type":41,"tag":223,"props":2047,"children":2048},{"style":313},[2049],{"type":47,"value":2050},"error",{"type":41,"tag":223,"props":2052,"children":2053},{"style":332},[2054],{"type":47,"value":320},{"type":41,"tag":223,"props":2056,"children":2057},{"style":236},[2058],{"type":47,"value":270},{"type":41,"tag":223,"props":2060,"children":2061},{"style":263},[2062],{"type":47,"value":2063},"Failed:",{"type":41,"tag":223,"props":2065,"children":2066},{"style":236},[2067],{"type":47,"value":270},{"type":41,"tag":223,"props":2069,"children":2070},{"style":236},[2071],{"type":47,"value":1320},{"type":41,"tag":223,"props":2073,"children":2074},{"style":242},[2075],{"type":47,"value":1863},{"type":41,"tag":223,"props":2077,"children":2078},{"style":236},[2079],{"type":47,"value":577},{"type":41,"tag":223,"props":2081,"children":2082},{"style":242},[2083],{"type":47,"value":2050},{"type":41,"tag":223,"props":2085,"children":2086},{"style":332},[2087],{"type":47,"value":642},{"type":41,"tag":223,"props":2089,"children":2090},{"style":236},[2091],{"type":47,"value":275},{"type":41,"tag":223,"props":2093,"children":2094},{"class":225,"line":649},[2095],{"type":41,"tag":223,"props":2096,"children":2097},{"style":236},[2098],{"type":47,"value":2099},"    }\n",{"type":41,"tag":223,"props":2101,"children":2102},{"class":225,"line":697},[2103],{"type":41,"tag":223,"props":2104,"children":2105},{"emptyLinePlaceholder":282},[2106],{"type":47,"value":285},{"type":41,"tag":223,"props":2108,"children":2109},{"class":225,"line":705},[2110],{"type":41,"tag":223,"props":2111,"children":2112},{"style":1048},[2113],{"type":47,"value":2114},"    \u002F\u002F Quick unwrap (throws on error)\n",{"type":41,"tag":223,"props":2116,"children":2118},{"class":225,"line":2117},16,[2119,2123,2128,2132,2136,2140,2144,2148,2152,2156,2160,2164,2168,2172,2176,2180,2184,2188,2193,2197],{"type":41,"tag":223,"props":2120,"children":2121},{"style":297},[2122],{"type":47,"value":1768},{"type":41,"tag":223,"props":2124,"children":2125},{"style":242},[2126],{"type":47,"value":2127}," output",{"type":41,"tag":223,"props":2129,"children":2130},{"style":236},[2131],{"type":47,"value":1778},{"type":41,"tag":223,"props":2133,"children":2134},{"style":230},[2135],{"type":47,"value":1272},{"type":41,"tag":223,"props":2137,"children":2138},{"style":242},[2139],{"type":47,"value":1787},{"type":41,"tag":223,"props":2141,"children":2142},{"style":236},[2143],{"type":47,"value":577},{"type":41,"tag":223,"props":2145,"children":2146},{"style":313},[2147],{"type":47,"value":1884},{"type":41,"tag":223,"props":2149,"children":2150},{"style":332},[2151],{"type":47,"value":320},{"type":41,"tag":223,"props":2153,"children":2154},{"style":236},[2155],{"type":47,"value":1375},{"type":41,"tag":223,"props":2157,"children":2158},{"style":332},[2159],{"type":47,"value":535},{"type":41,"tag":223,"props":2161,"children":2162},{"style":236},[2163],{"type":47,"value":340},{"type":41,"tag":223,"props":2165,"children":2166},{"style":236},[2167],{"type":47,"value":260},{"type":41,"tag":223,"props":2169,"children":2170},{"style":263},[2171],{"type":47,"value":1820},{"type":41,"tag":223,"props":2173,"children":2174},{"style":236},[2175],{"type":47,"value":270},{"type":41,"tag":223,"props":2177,"children":2178},{"style":236},[2179],{"type":47,"value":250},{"type":41,"tag":223,"props":2181,"children":2182},{"style":332},[2183],{"type":47,"value":642},{"type":41,"tag":223,"props":2185,"children":2186},{"style":236},[2187],{"type":47,"value":577},{"type":41,"tag":223,"props":2189,"children":2190},{"style":313},[2191],{"type":47,"value":2192},"unwrap",{"type":41,"tag":223,"props":2194,"children":2195},{"style":332},[2196],{"type":47,"value":942},{"type":41,"tag":223,"props":2198,"children":2199},{"style":236},[2200],{"type":47,"value":275},{"type":41,"tag":223,"props":2202,"children":2204},{"class":225,"line":2203},17,[2205],{"type":41,"tag":223,"props":2206,"children":2207},{"emptyLinePlaceholder":282},[2208],{"type":47,"value":285},{"type":41,"tag":223,"props":2210,"children":2212},{"class":225,"line":2211},18,[2213],{"type":41,"tag":223,"props":2214,"children":2215},{"style":1048},[2216],{"type":47,"value":2217},"    \u002F\u002F Batch with wait\n",{"type":41,"tag":223,"props":2219,"children":2221},{"class":225,"line":2220},19,[2222,2226,2231,2235,2239,2243,2247,2252],{"type":41,"tag":223,"props":2223,"children":2224},{"style":297},[2225],{"type":47,"value":1768},{"type":41,"tag":223,"props":2227,"children":2228},{"style":242},[2229],{"type":47,"value":2230}," results",{"type":41,"tag":223,"props":2232,"children":2233},{"style":236},[2234],{"type":47,"value":1778},{"type":41,"tag":223,"props":2236,"children":2237},{"style":230},[2238],{"type":47,"value":1272},{"type":41,"tag":223,"props":2240,"children":2241},{"style":242},[2242],{"type":47,"value":1787},{"type":41,"tag":223,"props":2244,"children":2245},{"style":236},[2246],{"type":47,"value":577},{"type":41,"tag":223,"props":2248,"children":2249},{"style":313},[2250],{"type":47,"value":2251},"batchTriggerAndWait",{"type":41,"tag":223,"props":2253,"children":2254},{"style":332},[2255],{"type":47,"value":2256},"([\n",{"type":41,"tag":223,"props":2258,"children":2260},{"class":225,"line":2259},20,[2261,2266,2270,2274,2278,2282,2286,2290,2295,2299,2303],{"type":41,"tag":223,"props":2262,"children":2263},{"style":236},[2264],{"type":47,"value":2265},"      {",{"type":41,"tag":223,"props":2267,"children":2268},{"style":332},[2269],{"type":47,"value":673},{"type":41,"tag":223,"props":2271,"children":2272},{"style":236},[2273],{"type":47,"value":340},{"type":41,"tag":223,"props":2275,"children":2276},{"style":236},[2277],{"type":47,"value":239},{"type":41,"tag":223,"props":2279,"children":2280},{"style":332},[2281],{"type":47,"value":535},{"type":41,"tag":223,"props":2283,"children":2284},{"style":236},[2285],{"type":47,"value":340},{"type":41,"tag":223,"props":2287,"children":2288},{"style":236},[2289],{"type":47,"value":260},{"type":41,"tag":223,"props":2291,"children":2292},{"style":263},[2293],{"type":47,"value":2294},"item1",{"type":41,"tag":223,"props":2296,"children":2297},{"style":236},[2298],{"type":47,"value":270},{"type":41,"tag":223,"props":2300,"children":2301},{"style":236},[2302],{"type":47,"value":250},{"type":41,"tag":223,"props":2304,"children":2305},{"style":236},[2306],{"type":47,"value":1568},{"type":41,"tag":223,"props":2308,"children":2310},{"class":225,"line":2309},21,[2311,2315,2319,2323,2327,2331,2335,2339,2344,2348,2352],{"type":41,"tag":223,"props":2312,"children":2313},{"style":236},[2314],{"type":47,"value":2265},{"type":41,"tag":223,"props":2316,"children":2317},{"style":332},[2318],{"type":47,"value":673},{"type":41,"tag":223,"props":2320,"children":2321},{"style":236},[2322],{"type":47,"value":340},{"type":41,"tag":223,"props":2324,"children":2325},{"style":236},[2326],{"type":47,"value":239},{"type":41,"tag":223,"props":2328,"children":2329},{"style":332},[2330],{"type":47,"value":535},{"type":41,"tag":223,"props":2332,"children":2333},{"style":236},[2334],{"type":47,"value":340},{"type":41,"tag":223,"props":2336,"children":2337},{"style":236},[2338],{"type":47,"value":260},{"type":41,"tag":223,"props":2340,"children":2341},{"style":263},[2342],{"type":47,"value":2343},"item2",{"type":41,"tag":223,"props":2345,"children":2346},{"style":236},[2347],{"type":47,"value":270},{"type":41,"tag":223,"props":2349,"children":2350},{"style":236},[2351],{"type":47,"value":250},{"type":41,"tag":223,"props":2353,"children":2354},{"style":236},[2355],{"type":47,"value":1568},{"type":41,"tag":223,"props":2357,"children":2359},{"class":225,"line":2358},22,[2360,2365],{"type":41,"tag":223,"props":2361,"children":2362},{"style":332},[2363],{"type":47,"value":2364},"    ])",{"type":41,"tag":223,"props":2366,"children":2367},{"style":236},[2368],{"type":47,"value":275},{"type":41,"tag":223,"props":2370,"children":2372},{"class":225,"line":2371},23,[2373],{"type":41,"tag":223,"props":2374,"children":2375},{"style":236},[2376],{"type":47,"value":473},{"type":41,"tag":223,"props":2378,"children":2380},{"class":225,"line":2379},24,[2381,2385,2389],{"type":41,"tag":223,"props":2382,"children":2383},{"style":236},[2384],{"type":47,"value":628},{"type":41,"tag":223,"props":2386,"children":2387},{"style":242},[2388],{"type":47,"value":642},{"type":41,"tag":223,"props":2390,"children":2391},{"style":236},[2392],{"type":47,"value":275},{"type":41,"tag":56,"props":2394,"children":2396},{"id":2395},"waits",[2397],{"type":47,"value":2398},"Waits",{"type":41,"tag":212,"props":2400,"children":2402},{"className":214,"code":2401,"language":216,"meta":217,"style":217},"import { task, wait } from \"@trigger.dev\u002Fsdk\";\n\nexport const taskWithWaits = task({\n  id: \"task-with-waits\",\n  run: async (payload) => {\n    await wait.for({ seconds: 30 });\n    await wait.for({ minutes: 5 });\n    await wait.until({ date: new Date(\"2024-12-25\") });\n\n    \u002F\u002F Wait for external approval\n    await wait.forToken({\n      token: \"user-approval-token\",\n      timeoutInSeconds: 3600,\n    });\n  },\n});\n",[2403],{"type":41,"tag":112,"props":2404,"children":2405},{"__ignoreMap":217},[2406,2454,2461,2493,2521,2556,2611,2664,2744,2751,2759,2787,2816,2837,2852,2859],{"type":41,"tag":223,"props":2407,"children":2408},{"class":225,"line":226},[2409,2413,2417,2421,2425,2430,2434,2438,2442,2446,2450],{"type":41,"tag":223,"props":2410,"children":2411},{"style":230},[2412],{"type":47,"value":233},{"type":41,"tag":223,"props":2414,"children":2415},{"style":236},[2416],{"type":47,"value":239},{"type":41,"tag":223,"props":2418,"children":2419},{"style":242},[2420],{"type":47,"value":245},{"type":41,"tag":223,"props":2422,"children":2423},{"style":236},[2424],{"type":47,"value":1320},{"type":41,"tag":223,"props":2426,"children":2427},{"style":242},[2428],{"type":47,"value":2429}," wait",{"type":41,"tag":223,"props":2431,"children":2432},{"style":236},[2433],{"type":47,"value":250},{"type":41,"tag":223,"props":2435,"children":2436},{"style":230},[2437],{"type":47,"value":255},{"type":41,"tag":223,"props":2439,"children":2440},{"style":236},[2441],{"type":47,"value":260},{"type":41,"tag":223,"props":2443,"children":2444},{"style":263},[2445],{"type":47,"value":117},{"type":41,"tag":223,"props":2447,"children":2448},{"style":236},[2449],{"type":47,"value":270},{"type":41,"tag":223,"props":2451,"children":2452},{"style":236},[2453],{"type":47,"value":275},{"type":41,"tag":223,"props":2455,"children":2456},{"class":225,"line":278},[2457],{"type":41,"tag":223,"props":2458,"children":2459},{"emptyLinePlaceholder":282},[2460],{"type":47,"value":285},{"type":41,"tag":223,"props":2462,"children":2463},{"class":225,"line":288},[2464,2468,2472,2477,2481,2485,2489],{"type":41,"tag":223,"props":2465,"children":2466},{"style":230},[2467],{"type":47,"value":294},{"type":41,"tag":223,"props":2469,"children":2470},{"style":297},[2471],{"type":47,"value":300},{"type":41,"tag":223,"props":2473,"children":2474},{"style":242},[2475],{"type":47,"value":2476}," taskWithWaits ",{"type":41,"tag":223,"props":2478,"children":2479},{"style":236},[2480],{"type":47,"value":310},{"type":41,"tag":223,"props":2482,"children":2483},{"style":313},[2484],{"type":47,"value":245},{"type":41,"tag":223,"props":2486,"children":2487},{"style":242},[2488],{"type":47,"value":320},{"type":41,"tag":223,"props":2490,"children":2491},{"style":236},[2492],{"type":47,"value":325},{"type":41,"tag":223,"props":2494,"children":2495},{"class":225,"line":328},[2496,2500,2504,2508,2513,2517],{"type":41,"tag":223,"props":2497,"children":2498},{"style":332},[2499],{"type":47,"value":335},{"type":41,"tag":223,"props":2501,"children":2502},{"style":236},[2503],{"type":47,"value":340},{"type":41,"tag":223,"props":2505,"children":2506},{"style":236},[2507],{"type":47,"value":260},{"type":41,"tag":223,"props":2509,"children":2510},{"style":263},[2511],{"type":47,"value":2512},"task-with-waits",{"type":41,"tag":223,"props":2514,"children":2515},{"style":236},[2516],{"type":47,"value":270},{"type":41,"tag":223,"props":2518,"children":2519},{"style":236},[2520],{"type":47,"value":358},{"type":41,"tag":223,"props":2522,"children":2523},{"class":225,"line":28},[2524,2528,2532,2536,2540,2544,2548,2552],{"type":41,"tag":223,"props":2525,"children":2526},{"style":313},[2527],{"type":47,"value":482},{"type":41,"tag":223,"props":2529,"children":2530},{"style":236},[2531],{"type":47,"value":340},{"type":41,"tag":223,"props":2533,"children":2534},{"style":297},[2535],{"type":47,"value":491},{"type":41,"tag":223,"props":2537,"children":2538},{"style":236},[2539],{"type":47,"value":496},{"type":41,"tag":223,"props":2541,"children":2542},{"style":499},[2543],{"type":47,"value":502},{"type":41,"tag":223,"props":2545,"children":2546},{"style":236},[2547],{"type":47,"value":642},{"type":41,"tag":223,"props":2549,"children":2550},{"style":297},[2551],{"type":47,"value":559},{"type":41,"tag":223,"props":2553,"children":2554},{"style":236},[2555],{"type":47,"value":375},{"type":41,"tag":223,"props":2557,"children":2558},{"class":225,"line":378},[2559,2564,2568,2572,2577,2581,2585,2590,2594,2599,2603,2607],{"type":41,"tag":223,"props":2560,"children":2561},{"style":230},[2562],{"type":47,"value":2563},"    await",{"type":41,"tag":223,"props":2565,"children":2566},{"style":242},[2567],{"type":47,"value":2429},{"type":41,"tag":223,"props":2569,"children":2570},{"style":236},[2571],{"type":47,"value":577},{"type":41,"tag":223,"props":2573,"children":2574},{"style":313},[2575],{"type":47,"value":2576},"for",{"type":41,"tag":223,"props":2578,"children":2579},{"style":332},[2580],{"type":47,"value":320},{"type":41,"tag":223,"props":2582,"children":2583},{"style":236},[2584],{"type":47,"value":1375},{"type":41,"tag":223,"props":2586,"children":2587},{"style":332},[2588],{"type":47,"value":2589}," seconds",{"type":41,"tag":223,"props":2591,"children":2592},{"style":236},[2593],{"type":47,"value":340},{"type":41,"tag":223,"props":2595,"children":2596},{"style":391},[2597],{"type":47,"value":2598}," 30",{"type":41,"tag":223,"props":2600,"children":2601},{"style":236},[2602],{"type":47,"value":250},{"type":41,"tag":223,"props":2604,"children":2605},{"style":332},[2606],{"type":47,"value":642},{"type":41,"tag":223,"props":2608,"children":2609},{"style":236},[2610],{"type":47,"value":275},{"type":41,"tag":223,"props":2612,"children":2613},{"class":225,"line":401},[2614,2618,2622,2626,2630,2634,2638,2643,2647,2652,2656,2660],{"type":41,"tag":223,"props":2615,"children":2616},{"style":230},[2617],{"type":47,"value":2563},{"type":41,"tag":223,"props":2619,"children":2620},{"style":242},[2621],{"type":47,"value":2429},{"type":41,"tag":223,"props":2623,"children":2624},{"style":236},[2625],{"type":47,"value":577},{"type":41,"tag":223,"props":2627,"children":2628},{"style":313},[2629],{"type":47,"value":2576},{"type":41,"tag":223,"props":2631,"children":2632},{"style":332},[2633],{"type":47,"value":320},{"type":41,"tag":223,"props":2635,"children":2636},{"style":236},[2637],{"type":47,"value":1375},{"type":41,"tag":223,"props":2639,"children":2640},{"style":332},[2641],{"type":47,"value":2642}," minutes",{"type":41,"tag":223,"props":2644,"children":2645},{"style":236},[2646],{"type":47,"value":340},{"type":41,"tag":223,"props":2648,"children":2649},{"style":391},[2650],{"type":47,"value":2651}," 5",{"type":41,"tag":223,"props":2653,"children":2654},{"style":236},[2655],{"type":47,"value":250},{"type":41,"tag":223,"props":2657,"children":2658},{"style":332},[2659],{"type":47,"value":642},{"type":41,"tag":223,"props":2661,"children":2662},{"style":236},[2663],{"type":47,"value":275},{"type":41,"tag":223,"props":2665,"children":2666},{"class":225,"line":423},[2667,2671,2675,2679,2684,2688,2692,2697,2701,2706,2711,2715,2719,2724,2728,2732,2736,2740],{"type":41,"tag":223,"props":2668,"children":2669},{"style":230},[2670],{"type":47,"value":2563},{"type":41,"tag":223,"props":2672,"children":2673},{"style":242},[2674],{"type":47,"value":2429},{"type":41,"tag":223,"props":2676,"children":2677},{"style":236},[2678],{"type":47,"value":577},{"type":41,"tag":223,"props":2680,"children":2681},{"style":313},[2682],{"type":47,"value":2683},"until",{"type":41,"tag":223,"props":2685,"children":2686},{"style":332},[2687],{"type":47,"value":320},{"type":41,"tag":223,"props":2689,"children":2690},{"style":236},[2691],{"type":47,"value":1375},{"type":41,"tag":223,"props":2693,"children":2694},{"style":332},[2695],{"type":47,"value":2696}," date",{"type":41,"tag":223,"props":2698,"children":2699},{"style":236},[2700],{"type":47,"value":340},{"type":41,"tag":223,"props":2702,"children":2703},{"style":236},[2704],{"type":47,"value":2705}," new",{"type":41,"tag":223,"props":2707,"children":2708},{"style":313},[2709],{"type":47,"value":2710}," Date",{"type":41,"tag":223,"props":2712,"children":2713},{"style":332},[2714],{"type":47,"value":320},{"type":41,"tag":223,"props":2716,"children":2717},{"style":236},[2718],{"type":47,"value":270},{"type":41,"tag":223,"props":2720,"children":2721},{"style":263},[2722],{"type":47,"value":2723},"2024-12-25",{"type":41,"tag":223,"props":2725,"children":2726},{"style":236},[2727],{"type":47,"value":270},{"type":41,"tag":223,"props":2729,"children":2730},{"style":332},[2731],{"type":47,"value":1955},{"type":41,"tag":223,"props":2733,"children":2734},{"style":236},[2735],{"type":47,"value":628},{"type":41,"tag":223,"props":2737,"children":2738},{"style":332},[2739],{"type":47,"value":642},{"type":41,"tag":223,"props":2741,"children":2742},{"style":236},[2743],{"type":47,"value":275},{"type":41,"tag":223,"props":2745,"children":2746},{"class":225,"line":445},[2747],{"type":41,"tag":223,"props":2748,"children":2749},{"emptyLinePlaceholder":282},[2750],{"type":47,"value":285},{"type":41,"tag":223,"props":2752,"children":2753},{"class":225,"line":467},[2754],{"type":41,"tag":223,"props":2755,"children":2756},{"style":1048},[2757],{"type":47,"value":2758},"    \u002F\u002F Wait for external approval\n",{"type":41,"tag":223,"props":2760,"children":2761},{"class":225,"line":476},[2762,2766,2770,2774,2779,2783],{"type":41,"tag":223,"props":2763,"children":2764},{"style":230},[2765],{"type":47,"value":2563},{"type":41,"tag":223,"props":2767,"children":2768},{"style":242},[2769],{"type":47,"value":2429},{"type":41,"tag":223,"props":2771,"children":2772},{"style":236},[2773],{"type":47,"value":577},{"type":41,"tag":223,"props":2775,"children":2776},{"style":313},[2777],{"type":47,"value":2778},"forToken",{"type":41,"tag":223,"props":2780,"children":2781},{"style":332},[2782],{"type":47,"value":320},{"type":41,"tag":223,"props":2784,"children":2785},{"style":236},[2786],{"type":47,"value":325},{"type":41,"tag":223,"props":2788,"children":2789},{"class":225,"line":566},[2790,2795,2799,2803,2808,2812],{"type":41,"tag":223,"props":2791,"children":2792},{"style":332},[2793],{"type":47,"value":2794},"      token",{"type":41,"tag":223,"props":2796,"children":2797},{"style":236},[2798],{"type":47,"value":340},{"type":41,"tag":223,"props":2800,"children":2801},{"style":236},[2802],{"type":47,"value":260},{"type":41,"tag":223,"props":2804,"children":2805},{"style":263},[2806],{"type":47,"value":2807},"user-approval-token",{"type":41,"tag":223,"props":2809,"children":2810},{"style":236},[2811],{"type":47,"value":270},{"type":41,"tag":223,"props":2813,"children":2814},{"style":236},[2815],{"type":47,"value":358},{"type":41,"tag":223,"props":2817,"children":2818},{"class":225,"line":649},[2819,2824,2828,2833],{"type":41,"tag":223,"props":2820,"children":2821},{"style":332},[2822],{"type":47,"value":2823},"      timeoutInSeconds",{"type":41,"tag":223,"props":2825,"children":2826},{"style":236},[2827],{"type":47,"value":340},{"type":41,"tag":223,"props":2829,"children":2830},{"style":391},[2831],{"type":47,"value":2832}," 3600",{"type":41,"tag":223,"props":2834,"children":2835},{"style":236},[2836],{"type":47,"value":358},{"type":41,"tag":223,"props":2838,"children":2839},{"class":225,"line":697},[2840,2844,2848],{"type":41,"tag":223,"props":2841,"children":2842},{"style":236},[2843],{"type":47,"value":2025},{"type":41,"tag":223,"props":2845,"children":2846},{"style":332},[2847],{"type":47,"value":642},{"type":41,"tag":223,"props":2849,"children":2850},{"style":236},[2851],{"type":47,"value":275},{"type":41,"tag":223,"props":2853,"children":2854},{"class":225,"line":705},[2855],{"type":41,"tag":223,"props":2856,"children":2857},{"style":236},[2858],{"type":47,"value":473},{"type":41,"tag":223,"props":2860,"children":2861},{"class":225,"line":2117},[2862,2866,2870],{"type":41,"tag":223,"props":2863,"children":2864},{"style":236},[2865],{"type":47,"value":628},{"type":41,"tag":223,"props":2867,"children":2868},{"style":242},[2869],{"type":47,"value":642},{"type":41,"tag":223,"props":2871,"children":2872},{"style":236},[2873],{"type":47,"value":275},{"type":41,"tag":2875,"props":2876,"children":2877},"blockquote",{},[2878],{"type":41,"tag":50,"props":2879,"children":2880},{},[2881],{"type":47,"value":2882},"Waits > 5 seconds are checkpointed and don't count toward compute.",{"type":41,"tag":56,"props":2884,"children":2886},{"id":2885},"concurrency-queues",[2887],{"type":47,"value":2888},"Concurrency & Queues",{"type":41,"tag":212,"props":2890,"children":2892},{"className":214,"code":2891,"language":216,"meta":217,"style":217},"import { task, queue } from \"@trigger.dev\u002Fsdk\";\n\n\u002F\u002F Shared queue\nconst emailQueue = queue({\n  name: \"email-processing\",\n  concurrencyLimit: 5,\n});\n\n\u002F\u002F Task-level concurrency\nexport const oneAtATime = task({\n  id: \"sequential-task\",\n  queue: { concurrencyLimit: 1 },\n  run: async (payload) => {\n    \u002F\u002F Only one instance runs at a time\n  },\n});\n\n\u002F\u002F Use shared queue\nexport const emailTask = task({\n  id: \"send-email\",\n  queue: emailQueue,\n  run: async (payload) => {},\n});\n\n\u002F\u002F Per-tenant concurrency (at trigger time)\nawait childTask.trigger(payload, {\n  queue: {\n    name: `user-${userId}`,\n    concurrencyLimit: 2,\n  },\n});\n",[2893],{"type":41,"tag":112,"props":2894,"children":2895},{"__ignoreMap":217},[2896,2944,2951,2959,2987,3016,3036,3051,3058,3066,3098,3126,3159,3194,3202,3209,3224,3231,3239,3271,3299,3319,3355,3370,3377,3386,3420,3436,3474,3496,3503],{"type":41,"tag":223,"props":2897,"children":2898},{"class":225,"line":226},[2899,2903,2907,2911,2915,2920,2924,2928,2932,2936,2940],{"type":41,"tag":223,"props":2900,"children":2901},{"style":230},[2902],{"type":47,"value":233},{"type":41,"tag":223,"props":2904,"children":2905},{"style":236},[2906],{"type":47,"value":239},{"type":41,"tag":223,"props":2908,"children":2909},{"style":242},[2910],{"type":47,"value":245},{"type":41,"tag":223,"props":2912,"children":2913},{"style":236},[2914],{"type":47,"value":1320},{"type":41,"tag":223,"props":2916,"children":2917},{"style":242},[2918],{"type":47,"value":2919}," queue",{"type":41,"tag":223,"props":2921,"children":2922},{"style":236},[2923],{"type":47,"value":250},{"type":41,"tag":223,"props":2925,"children":2926},{"style":230},[2927],{"type":47,"value":255},{"type":41,"tag":223,"props":2929,"children":2930},{"style":236},[2931],{"type":47,"value":260},{"type":41,"tag":223,"props":2933,"children":2934},{"style":263},[2935],{"type":47,"value":117},{"type":41,"tag":223,"props":2937,"children":2938},{"style":236},[2939],{"type":47,"value":270},{"type":41,"tag":223,"props":2941,"children":2942},{"style":236},[2943],{"type":47,"value":275},{"type":41,"tag":223,"props":2945,"children":2946},{"class":225,"line":278},[2947],{"type":41,"tag":223,"props":2948,"children":2949},{"emptyLinePlaceholder":282},[2950],{"type":47,"value":285},{"type":41,"tag":223,"props":2952,"children":2953},{"class":225,"line":288},[2954],{"type":41,"tag":223,"props":2955,"children":2956},{"style":1048},[2957],{"type":47,"value":2958},"\u002F\u002F Shared queue\n",{"type":41,"tag":223,"props":2960,"children":2961},{"class":225,"line":328},[2962,2966,2971,2975,2979,2983],{"type":41,"tag":223,"props":2963,"children":2964},{"style":297},[2965],{"type":47,"value":1258},{"type":41,"tag":223,"props":2967,"children":2968},{"style":242},[2969],{"type":47,"value":2970}," emailQueue ",{"type":41,"tag":223,"props":2972,"children":2973},{"style":236},[2974],{"type":47,"value":310},{"type":41,"tag":223,"props":2976,"children":2977},{"style":313},[2978],{"type":47,"value":2919},{"type":41,"tag":223,"props":2980,"children":2981},{"style":242},[2982],{"type":47,"value":320},{"type":41,"tag":223,"props":2984,"children":2985},{"style":236},[2986],{"type":47,"value":325},{"type":41,"tag":223,"props":2988,"children":2989},{"class":225,"line":28},[2990,2995,2999,3003,3008,3012],{"type":41,"tag":223,"props":2991,"children":2992},{"style":332},[2993],{"type":47,"value":2994},"  name",{"type":41,"tag":223,"props":2996,"children":2997},{"style":236},[2998],{"type":47,"value":340},{"type":41,"tag":223,"props":3000,"children":3001},{"style":236},[3002],{"type":47,"value":260},{"type":41,"tag":223,"props":3004,"children":3005},{"style":263},[3006],{"type":47,"value":3007},"email-processing",{"type":41,"tag":223,"props":3009,"children":3010},{"style":236},[3011],{"type":47,"value":270},{"type":41,"tag":223,"props":3013,"children":3014},{"style":236},[3015],{"type":47,"value":358},{"type":41,"tag":223,"props":3017,"children":3018},{"class":225,"line":378},[3019,3024,3028,3032],{"type":41,"tag":223,"props":3020,"children":3021},{"style":332},[3022],{"type":47,"value":3023},"  concurrencyLimit",{"type":41,"tag":223,"props":3025,"children":3026},{"style":236},[3027],{"type":47,"value":340},{"type":41,"tag":223,"props":3029,"children":3030},{"style":391},[3031],{"type":47,"value":2651},{"type":41,"tag":223,"props":3033,"children":3034},{"style":236},[3035],{"type":47,"value":358},{"type":41,"tag":223,"props":3037,"children":3038},{"class":225,"line":401},[3039,3043,3047],{"type":41,"tag":223,"props":3040,"children":3041},{"style":236},[3042],{"type":47,"value":628},{"type":41,"tag":223,"props":3044,"children":3045},{"style":242},[3046],{"type":47,"value":642},{"type":41,"tag":223,"props":3048,"children":3049},{"style":236},[3050],{"type":47,"value":275},{"type":41,"tag":223,"props":3052,"children":3053},{"class":225,"line":423},[3054],{"type":41,"tag":223,"props":3055,"children":3056},{"emptyLinePlaceholder":282},[3057],{"type":47,"value":285},{"type":41,"tag":223,"props":3059,"children":3060},{"class":225,"line":445},[3061],{"type":41,"tag":223,"props":3062,"children":3063},{"style":1048},[3064],{"type":47,"value":3065},"\u002F\u002F Task-level concurrency\n",{"type":41,"tag":223,"props":3067,"children":3068},{"class":225,"line":467},[3069,3073,3077,3082,3086,3090,3094],{"type":41,"tag":223,"props":3070,"children":3071},{"style":230},[3072],{"type":47,"value":294},{"type":41,"tag":223,"props":3074,"children":3075},{"style":297},[3076],{"type":47,"value":300},{"type":41,"tag":223,"props":3078,"children":3079},{"style":242},[3080],{"type":47,"value":3081}," oneAtATime ",{"type":41,"tag":223,"props":3083,"children":3084},{"style":236},[3085],{"type":47,"value":310},{"type":41,"tag":223,"props":3087,"children":3088},{"style":313},[3089],{"type":47,"value":245},{"type":41,"tag":223,"props":3091,"children":3092},{"style":242},[3093],{"type":47,"value":320},{"type":41,"tag":223,"props":3095,"children":3096},{"style":236},[3097],{"type":47,"value":325},{"type":41,"tag":223,"props":3099,"children":3100},{"class":225,"line":476},[3101,3105,3109,3113,3118,3122],{"type":41,"tag":223,"props":3102,"children":3103},{"style":332},[3104],{"type":47,"value":335},{"type":41,"tag":223,"props":3106,"children":3107},{"style":236},[3108],{"type":47,"value":340},{"type":41,"tag":223,"props":3110,"children":3111},{"style":236},[3112],{"type":47,"value":260},{"type":41,"tag":223,"props":3114,"children":3115},{"style":263},[3116],{"type":47,"value":3117},"sequential-task",{"type":41,"tag":223,"props":3119,"children":3120},{"style":236},[3121],{"type":47,"value":270},{"type":41,"tag":223,"props":3123,"children":3124},{"style":236},[3125],{"type":47,"value":358},{"type":41,"tag":223,"props":3127,"children":3128},{"class":225,"line":566},[3129,3134,3138,3142,3147,3151,3155],{"type":41,"tag":223,"props":3130,"children":3131},{"style":332},[3132],{"type":47,"value":3133},"  queue",{"type":41,"tag":223,"props":3135,"children":3136},{"style":236},[3137],{"type":47,"value":340},{"type":41,"tag":223,"props":3139,"children":3140},{"style":236},[3141],{"type":47,"value":239},{"type":41,"tag":223,"props":3143,"children":3144},{"style":332},[3145],{"type":47,"value":3146}," concurrencyLimit",{"type":41,"tag":223,"props":3148,"children":3149},{"style":236},[3150],{"type":47,"value":340},{"type":41,"tag":223,"props":3152,"children":3153},{"style":391},[3154],{"type":47,"value":1389},{"type":41,"tag":223,"props":3156,"children":3157},{"style":236},[3158],{"type":47,"value":1568},{"type":41,"tag":223,"props":3160,"children":3161},{"class":225,"line":649},[3162,3166,3170,3174,3178,3182,3186,3190],{"type":41,"tag":223,"props":3163,"children":3164},{"style":313},[3165],{"type":47,"value":482},{"type":41,"tag":223,"props":3167,"children":3168},{"style":236},[3169],{"type":47,"value":340},{"type":41,"tag":223,"props":3171,"children":3172},{"style":297},[3173],{"type":47,"value":491},{"type":41,"tag":223,"props":3175,"children":3176},{"style":236},[3177],{"type":47,"value":496},{"type":41,"tag":223,"props":3179,"children":3180},{"style":499},[3181],{"type":47,"value":502},{"type":41,"tag":223,"props":3183,"children":3184},{"style":236},[3185],{"type":47,"value":642},{"type":41,"tag":223,"props":3187,"children":3188},{"style":297},[3189],{"type":47,"value":559},{"type":41,"tag":223,"props":3191,"children":3192},{"style":236},[3193],{"type":47,"value":375},{"type":41,"tag":223,"props":3195,"children":3196},{"class":225,"line":697},[3197],{"type":41,"tag":223,"props":3198,"children":3199},{"style":1048},[3200],{"type":47,"value":3201},"    \u002F\u002F Only one instance runs at a time\n",{"type":41,"tag":223,"props":3203,"children":3204},{"class":225,"line":705},[3205],{"type":41,"tag":223,"props":3206,"children":3207},{"style":236},[3208],{"type":47,"value":473},{"type":41,"tag":223,"props":3210,"children":3211},{"class":225,"line":2117},[3212,3216,3220],{"type":41,"tag":223,"props":3213,"children":3214},{"style":236},[3215],{"type":47,"value":628},{"type":41,"tag":223,"props":3217,"children":3218},{"style":242},[3219],{"type":47,"value":642},{"type":41,"tag":223,"props":3221,"children":3222},{"style":236},[3223],{"type":47,"value":275},{"type":41,"tag":223,"props":3225,"children":3226},{"class":225,"line":2203},[3227],{"type":41,"tag":223,"props":3228,"children":3229},{"emptyLinePlaceholder":282},[3230],{"type":47,"value":285},{"type":41,"tag":223,"props":3232,"children":3233},{"class":225,"line":2211},[3234],{"type":41,"tag":223,"props":3235,"children":3236},{"style":1048},[3237],{"type":47,"value":3238},"\u002F\u002F Use shared queue\n",{"type":41,"tag":223,"props":3240,"children":3241},{"class":225,"line":2220},[3242,3246,3250,3255,3259,3263,3267],{"type":41,"tag":223,"props":3243,"children":3244},{"style":230},[3245],{"type":47,"value":294},{"type":41,"tag":223,"props":3247,"children":3248},{"style":297},[3249],{"type":47,"value":300},{"type":41,"tag":223,"props":3251,"children":3252},{"style":242},[3253],{"type":47,"value":3254}," emailTask ",{"type":41,"tag":223,"props":3256,"children":3257},{"style":236},[3258],{"type":47,"value":310},{"type":41,"tag":223,"props":3260,"children":3261},{"style":313},[3262],{"type":47,"value":245},{"type":41,"tag":223,"props":3264,"children":3265},{"style":242},[3266],{"type":47,"value":320},{"type":41,"tag":223,"props":3268,"children":3269},{"style":236},[3270],{"type":47,"value":325},{"type":41,"tag":223,"props":3272,"children":3273},{"class":225,"line":2259},[3274,3278,3282,3286,3291,3295],{"type":41,"tag":223,"props":3275,"children":3276},{"style":332},[3277],{"type":47,"value":335},{"type":41,"tag":223,"props":3279,"children":3280},{"style":236},[3281],{"type":47,"value":340},{"type":41,"tag":223,"props":3283,"children":3284},{"style":236},[3285],{"type":47,"value":260},{"type":41,"tag":223,"props":3287,"children":3288},{"style":263},[3289],{"type":47,"value":3290},"send-email",{"type":41,"tag":223,"props":3292,"children":3293},{"style":236},[3294],{"type":47,"value":270},{"type":41,"tag":223,"props":3296,"children":3297},{"style":236},[3298],{"type":47,"value":358},{"type":41,"tag":223,"props":3300,"children":3301},{"class":225,"line":2309},[3302,3306,3310,3315],{"type":41,"tag":223,"props":3303,"children":3304},{"style":332},[3305],{"type":47,"value":3133},{"type":41,"tag":223,"props":3307,"children":3308},{"style":236},[3309],{"type":47,"value":340},{"type":41,"tag":223,"props":3311,"children":3312},{"style":242},[3313],{"type":47,"value":3314}," emailQueue",{"type":41,"tag":223,"props":3316,"children":3317},{"style":236},[3318],{"type":47,"value":358},{"type":41,"tag":223,"props":3320,"children":3321},{"class":225,"line":2358},[3322,3326,3330,3334,3338,3342,3346,3350],{"type":41,"tag":223,"props":3323,"children":3324},{"style":313},[3325],{"type":47,"value":482},{"type":41,"tag":223,"props":3327,"children":3328},{"style":236},[3329],{"type":47,"value":340},{"type":41,"tag":223,"props":3331,"children":3332},{"style":297},[3333],{"type":47,"value":491},{"type":41,"tag":223,"props":3335,"children":3336},{"style":236},[3337],{"type":47,"value":496},{"type":41,"tag":223,"props":3339,"children":3340},{"style":499},[3341],{"type":47,"value":502},{"type":41,"tag":223,"props":3343,"children":3344},{"style":236},[3345],{"type":47,"value":642},{"type":41,"tag":223,"props":3347,"children":3348},{"style":297},[3349],{"type":47,"value":559},{"type":41,"tag":223,"props":3351,"children":3352},{"style":236},[3353],{"type":47,"value":3354}," {},\n",{"type":41,"tag":223,"props":3356,"children":3357},{"class":225,"line":2371},[3358,3362,3366],{"type":41,"tag":223,"props":3359,"children":3360},{"style":236},[3361],{"type":47,"value":628},{"type":41,"tag":223,"props":3363,"children":3364},{"style":242},[3365],{"type":47,"value":642},{"type":41,"tag":223,"props":3367,"children":3368},{"style":236},[3369],{"type":47,"value":275},{"type":41,"tag":223,"props":3371,"children":3372},{"class":225,"line":2379},[3373],{"type":41,"tag":223,"props":3374,"children":3375},{"emptyLinePlaceholder":282},[3376],{"type":47,"value":285},{"type":41,"tag":223,"props":3378,"children":3380},{"class":225,"line":3379},25,[3381],{"type":41,"tag":223,"props":3382,"children":3383},{"style":1048},[3384],{"type":47,"value":3385},"\u002F\u002F Per-tenant concurrency (at trigger time)\n",{"type":41,"tag":223,"props":3387,"children":3389},{"class":225,"line":3388},26,[3390,3395,3399,3403,3407,3412,3416],{"type":41,"tag":223,"props":3391,"children":3392},{"style":230},[3393],{"type":47,"value":3394},"await",{"type":41,"tag":223,"props":3396,"children":3397},{"style":242},[3398],{"type":47,"value":1787},{"type":41,"tag":223,"props":3400,"children":3401},{"style":236},[3402],{"type":47,"value":577},{"type":41,"tag":223,"props":3404,"children":3405},{"style":313},[3406],{"type":47,"value":1285},{"type":41,"tag":223,"props":3408,"children":3409},{"style":242},[3410],{"type":47,"value":3411},"(payload",{"type":41,"tag":223,"props":3413,"children":3414},{"style":236},[3415],{"type":47,"value":1320},{"type":41,"tag":223,"props":3417,"children":3418},{"style":236},[3419],{"type":47,"value":375},{"type":41,"tag":223,"props":3421,"children":3423},{"class":225,"line":3422},27,[3424,3428,3432],{"type":41,"tag":223,"props":3425,"children":3426},{"style":332},[3427],{"type":47,"value":3133},{"type":41,"tag":223,"props":3429,"children":3430},{"style":236},[3431],{"type":47,"value":340},{"type":41,"tag":223,"props":3433,"children":3434},{"style":236},[3435],{"type":47,"value":375},{"type":41,"tag":223,"props":3437,"children":3439},{"class":225,"line":3438},28,[3440,3444,3448,3452,3457,3461,3466,3470],{"type":41,"tag":223,"props":3441,"children":3442},{"style":332},[3443],{"type":47,"value":920},{"type":41,"tag":223,"props":3445,"children":3446},{"style":236},[3447],{"type":47,"value":340},{"type":41,"tag":223,"props":3449,"children":3450},{"style":236},[3451],{"type":47,"value":1076},{"type":41,"tag":223,"props":3453,"children":3454},{"style":263},[3455],{"type":47,"value":3456},"user-",{"type":41,"tag":223,"props":3458,"children":3459},{"style":236},[3460],{"type":47,"value":601},{"type":41,"tag":223,"props":3462,"children":3463},{"style":242},[3464],{"type":47,"value":3465},"userId",{"type":41,"tag":223,"props":3467,"children":3468},{"style":236},[3469],{"type":47,"value":1103},{"type":41,"tag":223,"props":3471,"children":3472},{"style":236},[3473],{"type":47,"value":358},{"type":41,"tag":223,"props":3475,"children":3477},{"class":225,"line":3476},29,[3478,3483,3487,3492],{"type":41,"tag":223,"props":3479,"children":3480},{"style":332},[3481],{"type":47,"value":3482},"    concurrencyLimit",{"type":41,"tag":223,"props":3484,"children":3485},{"style":236},[3486],{"type":47,"value":340},{"type":41,"tag":223,"props":3488,"children":3489},{"style":391},[3490],{"type":47,"value":3491}," 2",{"type":41,"tag":223,"props":3493,"children":3494},{"style":236},[3495],{"type":47,"value":358},{"type":41,"tag":223,"props":3497,"children":3498},{"class":225,"line":24},[3499],{"type":41,"tag":223,"props":3500,"children":3501},{"style":236},[3502],{"type":47,"value":473},{"type":41,"tag":223,"props":3504,"children":3506},{"class":225,"line":3505},31,[3507,3511,3515],{"type":41,"tag":223,"props":3508,"children":3509},{"style":236},[3510],{"type":47,"value":628},{"type":41,"tag":223,"props":3512,"children":3513},{"style":242},[3514],{"type":47,"value":642},{"type":41,"tag":223,"props":3516,"children":3517},{"style":236},[3518],{"type":47,"value":275},{"type":41,"tag":56,"props":3520,"children":3522},{"id":3521},"debouncing",[3523],{"type":47,"value":3524},"Debouncing",{"type":41,"tag":50,"props":3526,"children":3527},{},[3528],{"type":47,"value":3529},"Consolidate rapid triggers into a single execution:",{"type":41,"tag":212,"props":3531,"children":3533},{"className":214,"code":3532,"language":216,"meta":217,"style":217},"await myTask.trigger(\n  { userId: \"123\" },\n  {\n    debounce: {\n      key: \"user-123-update\",\n      delay: \"5s\",\n      mode: \"trailing\", \u002F\u002F Use latest payload (default: \"leading\")\n    },\n  }\n);\n",[3534],{"type":41,"tag":112,"props":3535,"children":3536},{"__ignoreMap":217},[3537,3562,3593,3601,3617,3646,3675,3709,3717,3725],{"type":41,"tag":223,"props":3538,"children":3539},{"class":225,"line":226},[3540,3544,3549,3553,3557],{"type":41,"tag":223,"props":3541,"children":3542},{"style":230},[3543],{"type":47,"value":3394},{"type":41,"tag":223,"props":3545,"children":3546},{"style":242},[3547],{"type":47,"value":3548}," myTask",{"type":41,"tag":223,"props":3550,"children":3551},{"style":236},[3552],{"type":47,"value":577},{"type":41,"tag":223,"props":3554,"children":3555},{"style":313},[3556],{"type":47,"value":1285},{"type":41,"tag":223,"props":3558,"children":3559},{"style":242},[3560],{"type":47,"value":3561},"(\n",{"type":41,"tag":223,"props":3563,"children":3564},{"class":225,"line":278},[3565,3569,3573,3577,3581,3585,3589],{"type":41,"tag":223,"props":3566,"children":3567},{"style":236},[3568],{"type":47,"value":1510},{"type":41,"tag":223,"props":3570,"children":3571},{"style":332},[3572],{"type":47,"value":515},{"type":41,"tag":223,"props":3574,"children":3575},{"style":236},[3576],{"type":47,"value":340},{"type":41,"tag":223,"props":3578,"children":3579},{"style":236},[3580],{"type":47,"value":260},{"type":41,"tag":223,"props":3582,"children":3583},{"style":263},[3584],{"type":47,"value":1345},{"type":41,"tag":223,"props":3586,"children":3587},{"style":236},[3588],{"type":47,"value":270},{"type":41,"tag":223,"props":3590,"children":3591},{"style":236},[3592],{"type":47,"value":1568},{"type":41,"tag":223,"props":3594,"children":3595},{"class":225,"line":288},[3596],{"type":41,"tag":223,"props":3597,"children":3598},{"style":236},[3599],{"type":47,"value":3600},"  {\n",{"type":41,"tag":223,"props":3602,"children":3603},{"class":225,"line":328},[3604,3609,3613],{"type":41,"tag":223,"props":3605,"children":3606},{"style":332},[3607],{"type":47,"value":3608},"    debounce",{"type":41,"tag":223,"props":3610,"children":3611},{"style":236},[3612],{"type":47,"value":340},{"type":41,"tag":223,"props":3614,"children":3615},{"style":236},[3616],{"type":47,"value":375},{"type":41,"tag":223,"props":3618,"children":3619},{"class":225,"line":28},[3620,3625,3629,3633,3638,3642],{"type":41,"tag":223,"props":3621,"children":3622},{"style":332},[3623],{"type":47,"value":3624},"      key",{"type":41,"tag":223,"props":3626,"children":3627},{"style":236},[3628],{"type":47,"value":340},{"type":41,"tag":223,"props":3630,"children":3631},{"style":236},[3632],{"type":47,"value":260},{"type":41,"tag":223,"props":3634,"children":3635},{"style":263},[3636],{"type":47,"value":3637},"user-123-update",{"type":41,"tag":223,"props":3639,"children":3640},{"style":236},[3641],{"type":47,"value":270},{"type":41,"tag":223,"props":3643,"children":3644},{"style":236},[3645],{"type":47,"value":358},{"type":41,"tag":223,"props":3647,"children":3648},{"class":225,"line":378},[3649,3654,3658,3662,3667,3671],{"type":41,"tag":223,"props":3650,"children":3651},{"style":332},[3652],{"type":47,"value":3653},"      delay",{"type":41,"tag":223,"props":3655,"children":3656},{"style":236},[3657],{"type":47,"value":340},{"type":41,"tag":223,"props":3659,"children":3660},{"style":236},[3661],{"type":47,"value":260},{"type":41,"tag":223,"props":3663,"children":3664},{"style":263},[3665],{"type":47,"value":3666},"5s",{"type":41,"tag":223,"props":3668,"children":3669},{"style":236},[3670],{"type":47,"value":270},{"type":41,"tag":223,"props":3672,"children":3673},{"style":236},[3674],{"type":47,"value":358},{"type":41,"tag":223,"props":3676,"children":3677},{"class":225,"line":401},[3678,3683,3687,3691,3696,3700,3704],{"type":41,"tag":223,"props":3679,"children":3680},{"style":332},[3681],{"type":47,"value":3682},"      mode",{"type":41,"tag":223,"props":3684,"children":3685},{"style":236},[3686],{"type":47,"value":340},{"type":41,"tag":223,"props":3688,"children":3689},{"style":236},[3690],{"type":47,"value":260},{"type":41,"tag":223,"props":3692,"children":3693},{"style":263},[3694],{"type":47,"value":3695},"trailing",{"type":41,"tag":223,"props":3697,"children":3698},{"style":236},[3699],{"type":47,"value":270},{"type":41,"tag":223,"props":3701,"children":3702},{"style":236},[3703],{"type":47,"value":1320},{"type":41,"tag":223,"props":3705,"children":3706},{"style":1048},[3707],{"type":47,"value":3708}," \u002F\u002F Use latest payload (default: \"leading\")\n",{"type":41,"tag":223,"props":3710,"children":3711},{"class":225,"line":423},[3712],{"type":41,"tag":223,"props":3713,"children":3714},{"style":236},[3715],{"type":47,"value":3716},"    },\n",{"type":41,"tag":223,"props":3718,"children":3719},{"class":225,"line":445},[3720],{"type":41,"tag":223,"props":3721,"children":3722},{"style":236},[3723],{"type":47,"value":3724},"  }\n",{"type":41,"tag":223,"props":3726,"children":3727},{"class":225,"line":467},[3728,3732],{"type":41,"tag":223,"props":3729,"children":3730},{"style":242},[3731],{"type":47,"value":642},{"type":41,"tag":223,"props":3733,"children":3734},{"style":236},[3735],{"type":47,"value":275},{"type":41,"tag":56,"props":3737,"children":3739},{"id":3738},"idempotency",[3740],{"type":47,"value":3741},"Idempotency",{"type":41,"tag":212,"props":3743,"children":3745},{"className":214,"code":3744,"language":216,"meta":217,"style":217},"import { task, idempotencyKeys } from \"@trigger.dev\u002Fsdk\";\n\nexport const paymentTask = task({\n  id: \"process-payment\",\n  run: async (payload: { orderId: string }) => {\n    const key = await idempotencyKeys.create(`payment-${payload.orderId}`);\n\n    await chargeCustomer.trigger(payload, {\n      idempotencyKey: key,\n      idempotencyKeyTTL: \"24h\",\n    });\n  },\n});\n",[3746],{"type":41,"tag":112,"props":3747,"children":3748},{"__ignoreMap":217},[3749,3797,3804,3836,3864,3921,3996,4003,4039,4059,4088,4103,4110],{"type":41,"tag":223,"props":3750,"children":3751},{"class":225,"line":226},[3752,3756,3760,3764,3768,3773,3777,3781,3785,3789,3793],{"type":41,"tag":223,"props":3753,"children":3754},{"style":230},[3755],{"type":47,"value":233},{"type":41,"tag":223,"props":3757,"children":3758},{"style":236},[3759],{"type":47,"value":239},{"type":41,"tag":223,"props":3761,"children":3762},{"style":242},[3763],{"type":47,"value":245},{"type":41,"tag":223,"props":3765,"children":3766},{"style":236},[3767],{"type":47,"value":1320},{"type":41,"tag":223,"props":3769,"children":3770},{"style":242},[3771],{"type":47,"value":3772}," idempotencyKeys",{"type":41,"tag":223,"props":3774,"children":3775},{"style":236},[3776],{"type":47,"value":250},{"type":41,"tag":223,"props":3778,"children":3779},{"style":230},[3780],{"type":47,"value":255},{"type":41,"tag":223,"props":3782,"children":3783},{"style":236},[3784],{"type":47,"value":260},{"type":41,"tag":223,"props":3786,"children":3787},{"style":263},[3788],{"type":47,"value":117},{"type":41,"tag":223,"props":3790,"children":3791},{"style":236},[3792],{"type":47,"value":270},{"type":41,"tag":223,"props":3794,"children":3795},{"style":236},[3796],{"type":47,"value":275},{"type":41,"tag":223,"props":3798,"children":3799},{"class":225,"line":278},[3800],{"type":41,"tag":223,"props":3801,"children":3802},{"emptyLinePlaceholder":282},[3803],{"type":47,"value":285},{"type":41,"tag":223,"props":3805,"children":3806},{"class":225,"line":288},[3807,3811,3815,3820,3824,3828,3832],{"type":41,"tag":223,"props":3808,"children":3809},{"style":230},[3810],{"type":47,"value":294},{"type":41,"tag":223,"props":3812,"children":3813},{"style":297},[3814],{"type":47,"value":300},{"type":41,"tag":223,"props":3816,"children":3817},{"style":242},[3818],{"type":47,"value":3819}," paymentTask ",{"type":41,"tag":223,"props":3821,"children":3822},{"style":236},[3823],{"type":47,"value":310},{"type":41,"tag":223,"props":3825,"children":3826},{"style":313},[3827],{"type":47,"value":245},{"type":41,"tag":223,"props":3829,"children":3830},{"style":242},[3831],{"type":47,"value":320},{"type":41,"tag":223,"props":3833,"children":3834},{"style":236},[3835],{"type":47,"value":325},{"type":41,"tag":223,"props":3837,"children":3838},{"class":225,"line":328},[3839,3843,3847,3851,3856,3860],{"type":41,"tag":223,"props":3840,"children":3841},{"style":332},[3842],{"type":47,"value":335},{"type":41,"tag":223,"props":3844,"children":3845},{"style":236},[3846],{"type":47,"value":340},{"type":41,"tag":223,"props":3848,"children":3849},{"style":236},[3850],{"type":47,"value":260},{"type":41,"tag":223,"props":3852,"children":3853},{"style":263},[3854],{"type":47,"value":3855},"process-payment",{"type":41,"tag":223,"props":3857,"children":3858},{"style":236},[3859],{"type":47,"value":270},{"type":41,"tag":223,"props":3861,"children":3862},{"style":236},[3863],{"type":47,"value":358},{"type":41,"tag":223,"props":3865,"children":3866},{"class":225,"line":28},[3867,3871,3875,3879,3883,3887,3891,3895,3900,3904,3908,3913,3917],{"type":41,"tag":223,"props":3868,"children":3869},{"style":313},[3870],{"type":47,"value":482},{"type":41,"tag":223,"props":3872,"children":3873},{"style":236},[3874],{"type":47,"value":340},{"type":41,"tag":223,"props":3876,"children":3877},{"style":297},[3878],{"type":47,"value":491},{"type":41,"tag":223,"props":3880,"children":3881},{"style":236},[3882],{"type":47,"value":496},{"type":41,"tag":223,"props":3884,"children":3885},{"style":499},[3886],{"type":47,"value":502},{"type":41,"tag":223,"props":3888,"children":3889},{"style":236},[3890],{"type":47,"value":340},{"type":41,"tag":223,"props":3892,"children":3893},{"style":236},[3894],{"type":47,"value":239},{"type":41,"tag":223,"props":3896,"children":3897},{"style":332},[3898],{"type":47,"value":3899}," orderId",{"type":41,"tag":223,"props":3901,"children":3902},{"style":236},[3903],{"type":47,"value":340},{"type":41,"tag":223,"props":3905,"children":3906},{"style":522},[3907],{"type":47,"value":525},{"type":41,"tag":223,"props":3909,"children":3910},{"style":236},[3911],{"type":47,"value":3912}," })",{"type":41,"tag":223,"props":3914,"children":3915},{"style":297},[3916],{"type":47,"value":559},{"type":41,"tag":223,"props":3918,"children":3919},{"style":236},[3920],{"type":47,"value":375},{"type":41,"tag":223,"props":3922,"children":3923},{"class":225,"line":378},[3924,3928,3933,3937,3941,3945,3949,3954,3958,3962,3967,3971,3975,3979,3984,3988,3992],{"type":41,"tag":223,"props":3925,"children":3926},{"style":297},[3927],{"type":47,"value":1768},{"type":41,"tag":223,"props":3929,"children":3930},{"style":242},[3931],{"type":47,"value":3932}," key",{"type":41,"tag":223,"props":3934,"children":3935},{"style":236},[3936],{"type":47,"value":1778},{"type":41,"tag":223,"props":3938,"children":3939},{"style":230},[3940],{"type":47,"value":1272},{"type":41,"tag":223,"props":3942,"children":3943},{"style":242},[3944],{"type":47,"value":3772},{"type":41,"tag":223,"props":3946,"children":3947},{"style":236},[3948],{"type":47,"value":577},{"type":41,"tag":223,"props":3950,"children":3951},{"style":313},[3952],{"type":47,"value":3953},"create",{"type":41,"tag":223,"props":3955,"children":3956},{"style":332},[3957],{"type":47,"value":320},{"type":41,"tag":223,"props":3959,"children":3960},{"style":236},[3961],{"type":47,"value":591},{"type":41,"tag":223,"props":3963,"children":3964},{"style":263},[3965],{"type":47,"value":3966},"payment-",{"type":41,"tag":223,"props":3968,"children":3969},{"style":236},[3970],{"type":47,"value":601},{"type":41,"tag":223,"props":3972,"children":3973},{"style":242},[3974],{"type":47,"value":502},{"type":41,"tag":223,"props":3976,"children":3977},{"style":236},[3978],{"type":47,"value":577},{"type":41,"tag":223,"props":3980,"children":3981},{"style":242},[3982],{"type":47,"value":3983},"orderId",{"type":41,"tag":223,"props":3985,"children":3986},{"style":236},[3987],{"type":47,"value":1103},{"type":41,"tag":223,"props":3989,"children":3990},{"style":332},[3991],{"type":47,"value":642},{"type":41,"tag":223,"props":3993,"children":3994},{"style":236},[3995],{"type":47,"value":275},{"type":41,"tag":223,"props":3997,"children":3998},{"class":225,"line":401},[3999],{"type":41,"tag":223,"props":4000,"children":4001},{"emptyLinePlaceholder":282},[4002],{"type":47,"value":285},{"type":41,"tag":223,"props":4004,"children":4005},{"class":225,"line":423},[4006,4010,4015,4019,4023,4027,4031,4035],{"type":41,"tag":223,"props":4007,"children":4008},{"style":230},[4009],{"type":47,"value":2563},{"type":41,"tag":223,"props":4011,"children":4012},{"style":242},[4013],{"type":47,"value":4014}," chargeCustomer",{"type":41,"tag":223,"props":4016,"children":4017},{"style":236},[4018],{"type":47,"value":577},{"type":41,"tag":223,"props":4020,"children":4021},{"style":313},[4022],{"type":47,"value":1285},{"type":41,"tag":223,"props":4024,"children":4025},{"style":332},[4026],{"type":47,"value":320},{"type":41,"tag":223,"props":4028,"children":4029},{"style":242},[4030],{"type":47,"value":502},{"type":41,"tag":223,"props":4032,"children":4033},{"style":236},[4034],{"type":47,"value":1320},{"type":41,"tag":223,"props":4036,"children":4037},{"style":236},[4038],{"type":47,"value":375},{"type":41,"tag":223,"props":4040,"children":4041},{"class":225,"line":445},[4042,4047,4051,4055],{"type":41,"tag":223,"props":4043,"children":4044},{"style":332},[4045],{"type":47,"value":4046},"      idempotencyKey",{"type":41,"tag":223,"props":4048,"children":4049},{"style":236},[4050],{"type":47,"value":340},{"type":41,"tag":223,"props":4052,"children":4053},{"style":242},[4054],{"type":47,"value":3932},{"type":41,"tag":223,"props":4056,"children":4057},{"style":236},[4058],{"type":47,"value":358},{"type":41,"tag":223,"props":4060,"children":4061},{"class":225,"line":467},[4062,4067,4071,4075,4080,4084],{"type":41,"tag":223,"props":4063,"children":4064},{"style":332},[4065],{"type":47,"value":4066},"      idempotencyKeyTTL",{"type":41,"tag":223,"props":4068,"children":4069},{"style":236},[4070],{"type":47,"value":340},{"type":41,"tag":223,"props":4072,"children":4073},{"style":236},[4074],{"type":47,"value":260},{"type":41,"tag":223,"props":4076,"children":4077},{"style":263},[4078],{"type":47,"value":4079},"24h",{"type":41,"tag":223,"props":4081,"children":4082},{"style":236},[4083],{"type":47,"value":270},{"type":41,"tag":223,"props":4085,"children":4086},{"style":236},[4087],{"type":47,"value":358},{"type":41,"tag":223,"props":4089,"children":4090},{"class":225,"line":476},[4091,4095,4099],{"type":41,"tag":223,"props":4092,"children":4093},{"style":236},[4094],{"type":47,"value":2025},{"type":41,"tag":223,"props":4096,"children":4097},{"style":332},[4098],{"type":47,"value":642},{"type":41,"tag":223,"props":4100,"children":4101},{"style":236},[4102],{"type":47,"value":275},{"type":41,"tag":223,"props":4104,"children":4105},{"class":225,"line":566},[4106],{"type":41,"tag":223,"props":4107,"children":4108},{"style":236},[4109],{"type":47,"value":473},{"type":41,"tag":223,"props":4111,"children":4112},{"class":225,"line":649},[4113,4117,4121],{"type":41,"tag":223,"props":4114,"children":4115},{"style":236},[4116],{"type":47,"value":628},{"type":41,"tag":223,"props":4118,"children":4119},{"style":242},[4120],{"type":47,"value":642},{"type":41,"tag":223,"props":4122,"children":4123},{"style":236},[4124],{"type":47,"value":275},{"type":41,"tag":56,"props":4126,"children":4128},{"id":4127},"error-handling-retries",[4129],{"type":47,"value":4130},"Error Handling & Retries",{"type":41,"tag":212,"props":4132,"children":4134},{"className":214,"code":4133,"language":216,"meta":217,"style":217},"import { task, retry, AbortTaskRunError } from \"@trigger.dev\u002Fsdk\";\n\nexport const resilientTask = task({\n  id: \"resilient-task\",\n  retry: {\n    maxAttempts: 10,\n    factor: 1.8,\n    minTimeoutInMs: 500,\n    maxTimeoutInMs: 30_000,\n  },\n  catchError: async ({ error, ctx }) => {\n    if (error.code === \"FATAL_ERROR\") {\n      throw new AbortTaskRunError(\"Cannot retry\");\n    }\n    return { retryAt: new Date(Date.now() + 60000) };\n  },\n  run: async (payload) => {\n    \u002F\u002F Retry specific operations\n    const result = await retry.onThrow(\n      async () => unstableApiCall(payload),\n      { maxAttempts: 3 }\n    );\n\n    \u002F\u002F HTTP retries with conditions\n    const response = await retry.fetch(\"https:\u002F\u002Fapi.example.com\", {\n      retry: {\n        maxAttempts: 5,\n        condition: (res, err) => res?.status === 429 || res?.status >= 500,\n      },\n    });\n  },\n});\n",[4135],{"type":41,"tag":112,"props":4136,"children":4137},{"__ignoreMap":217},[4138,4195,4202,4234,4262,4277,4296,4315,4334,4353,4360,4407,4456,4497,4504,4574,4581,4616,4624,4660,4698,4724,4736,4743,4751,4809,4825,4845,4937,4945,4960,4967],{"type":41,"tag":223,"props":4139,"children":4140},{"class":225,"line":226},[4141,4145,4149,4153,4157,4162,4166,4171,4175,4179,4183,4187,4191],{"type":41,"tag":223,"props":4142,"children":4143},{"style":230},[4144],{"type":47,"value":233},{"type":41,"tag":223,"props":4146,"children":4147},{"style":236},[4148],{"type":47,"value":239},{"type":41,"tag":223,"props":4150,"children":4151},{"style":242},[4152],{"type":47,"value":245},{"type":41,"tag":223,"props":4154,"children":4155},{"style":236},[4156],{"type":47,"value":1320},{"type":41,"tag":223,"props":4158,"children":4159},{"style":242},[4160],{"type":47,"value":4161}," retry",{"type":41,"tag":223,"props":4163,"children":4164},{"style":236},[4165],{"type":47,"value":1320},{"type":41,"tag":223,"props":4167,"children":4168},{"style":242},[4169],{"type":47,"value":4170}," AbortTaskRunError",{"type":41,"tag":223,"props":4172,"children":4173},{"style":236},[4174],{"type":47,"value":250},{"type":41,"tag":223,"props":4176,"children":4177},{"style":230},[4178],{"type":47,"value":255},{"type":41,"tag":223,"props":4180,"children":4181},{"style":236},[4182],{"type":47,"value":260},{"type":41,"tag":223,"props":4184,"children":4185},{"style":263},[4186],{"type":47,"value":117},{"type":41,"tag":223,"props":4188,"children":4189},{"style":236},[4190],{"type":47,"value":270},{"type":41,"tag":223,"props":4192,"children":4193},{"style":236},[4194],{"type":47,"value":275},{"type":41,"tag":223,"props":4196,"children":4197},{"class":225,"line":278},[4198],{"type":41,"tag":223,"props":4199,"children":4200},{"emptyLinePlaceholder":282},[4201],{"type":47,"value":285},{"type":41,"tag":223,"props":4203,"children":4204},{"class":225,"line":288},[4205,4209,4213,4218,4222,4226,4230],{"type":41,"tag":223,"props":4206,"children":4207},{"style":230},[4208],{"type":47,"value":294},{"type":41,"tag":223,"props":4210,"children":4211},{"style":297},[4212],{"type":47,"value":300},{"type":41,"tag":223,"props":4214,"children":4215},{"style":242},[4216],{"type":47,"value":4217}," resilientTask ",{"type":41,"tag":223,"props":4219,"children":4220},{"style":236},[4221],{"type":47,"value":310},{"type":41,"tag":223,"props":4223,"children":4224},{"style":313},[4225],{"type":47,"value":245},{"type":41,"tag":223,"props":4227,"children":4228},{"style":242},[4229],{"type":47,"value":320},{"type":41,"tag":223,"props":4231,"children":4232},{"style":236},[4233],{"type":47,"value":325},{"type":41,"tag":223,"props":4235,"children":4236},{"class":225,"line":328},[4237,4241,4245,4249,4254,4258],{"type":41,"tag":223,"props":4238,"children":4239},{"style":332},[4240],{"type":47,"value":335},{"type":41,"tag":223,"props":4242,"children":4243},{"style":236},[4244],{"type":47,"value":340},{"type":41,"tag":223,"props":4246,"children":4247},{"style":236},[4248],{"type":47,"value":260},{"type":41,"tag":223,"props":4250,"children":4251},{"style":263},[4252],{"type":47,"value":4253},"resilient-task",{"type":41,"tag":223,"props":4255,"children":4256},{"style":236},[4257],{"type":47,"value":270},{"type":41,"tag":223,"props":4259,"children":4260},{"style":236},[4261],{"type":47,"value":358},{"type":41,"tag":223,"props":4263,"children":4264},{"class":225,"line":28},[4265,4269,4273],{"type":41,"tag":223,"props":4266,"children":4267},{"style":332},[4268],{"type":47,"value":366},{"type":41,"tag":223,"props":4270,"children":4271},{"style":236},[4272],{"type":47,"value":340},{"type":41,"tag":223,"props":4274,"children":4275},{"style":236},[4276],{"type":47,"value":375},{"type":41,"tag":223,"props":4278,"children":4279},{"class":225,"line":378},[4280,4284,4288,4292],{"type":41,"tag":223,"props":4281,"children":4282},{"style":332},[4283],{"type":47,"value":384},{"type":41,"tag":223,"props":4285,"children":4286},{"style":236},[4287],{"type":47,"value":340},{"type":41,"tag":223,"props":4289,"children":4290},{"style":391},[4291],{"type":47,"value":394},{"type":41,"tag":223,"props":4293,"children":4294},{"style":236},[4295],{"type":47,"value":358},{"type":41,"tag":223,"props":4297,"children":4298},{"class":225,"line":401},[4299,4303,4307,4311],{"type":41,"tag":223,"props":4300,"children":4301},{"style":332},[4302],{"type":47,"value":407},{"type":41,"tag":223,"props":4304,"children":4305},{"style":236},[4306],{"type":47,"value":340},{"type":41,"tag":223,"props":4308,"children":4309},{"style":391},[4310],{"type":47,"value":416},{"type":41,"tag":223,"props":4312,"children":4313},{"style":236},[4314],{"type":47,"value":358},{"type":41,"tag":223,"props":4316,"children":4317},{"class":225,"line":423},[4318,4322,4326,4330],{"type":41,"tag":223,"props":4319,"children":4320},{"style":332},[4321],{"type":47,"value":429},{"type":41,"tag":223,"props":4323,"children":4324},{"style":236},[4325],{"type":47,"value":340},{"type":41,"tag":223,"props":4327,"children":4328},{"style":391},[4329],{"type":47,"value":438},{"type":41,"tag":223,"props":4331,"children":4332},{"style":236},[4333],{"type":47,"value":358},{"type":41,"tag":223,"props":4335,"children":4336},{"class":225,"line":445},[4337,4341,4345,4349],{"type":41,"tag":223,"props":4338,"children":4339},{"style":332},[4340],{"type":47,"value":451},{"type":41,"tag":223,"props":4342,"children":4343},{"style":236},[4344],{"type":47,"value":340},{"type":41,"tag":223,"props":4346,"children":4347},{"style":391},[4348],{"type":47,"value":460},{"type":41,"tag":223,"props":4350,"children":4351},{"style":236},[4352],{"type":47,"value":358},{"type":41,"tag":223,"props":4354,"children":4355},{"class":225,"line":467},[4356],{"type":41,"tag":223,"props":4357,"children":4358},{"style":236},[4359],{"type":47,"value":473},{"type":41,"tag":223,"props":4361,"children":4362},{"class":225,"line":476},[4363,4368,4372,4376,4381,4386,4390,4395,4399,4403],{"type":41,"tag":223,"props":4364,"children":4365},{"style":313},[4366],{"type":47,"value":4367},"  catchError",{"type":41,"tag":223,"props":4369,"children":4370},{"style":236},[4371],{"type":47,"value":340},{"type":41,"tag":223,"props":4373,"children":4374},{"style":297},[4375],{"type":47,"value":491},{"type":41,"tag":223,"props":4377,"children":4378},{"style":236},[4379],{"type":47,"value":4380}," ({",{"type":41,"tag":223,"props":4382,"children":4383},{"style":499},[4384],{"type":47,"value":4385}," error",{"type":41,"tag":223,"props":4387,"children":4388},{"style":236},[4389],{"type":47,"value":1320},{"type":41,"tag":223,"props":4391,"children":4392},{"style":499},[4393],{"type":47,"value":4394}," ctx",{"type":41,"tag":223,"props":4396,"children":4397},{"style":236},[4398],{"type":47,"value":3912},{"type":41,"tag":223,"props":4400,"children":4401},{"style":297},[4402],{"type":47,"value":559},{"type":41,"tag":223,"props":4404,"children":4405},{"style":236},[4406],{"type":47,"value":375},{"type":41,"tag":223,"props":4408,"children":4409},{"class":225,"line":566},[4410,4414,4418,4422,4426,4430,4435,4439,4444,4448,4452],{"type":41,"tag":223,"props":4411,"children":4412},{"style":230},[4413],{"type":47,"value":1932},{"type":41,"tag":223,"props":4415,"children":4416},{"style":332},[4417],{"type":47,"value":496},{"type":41,"tag":223,"props":4419,"children":4420},{"style":242},[4421],{"type":47,"value":2050},{"type":41,"tag":223,"props":4423,"children":4424},{"style":236},[4425],{"type":47,"value":577},{"type":41,"tag":223,"props":4427,"children":4428},{"style":242},[4429],{"type":47,"value":112},{"type":41,"tag":223,"props":4431,"children":4432},{"style":236},[4433],{"type":47,"value":4434}," ===",{"type":41,"tag":223,"props":4436,"children":4437},{"style":236},[4438],{"type":47,"value":260},{"type":41,"tag":223,"props":4440,"children":4441},{"style":263},[4442],{"type":47,"value":4443},"FATAL_ERROR",{"type":41,"tag":223,"props":4445,"children":4446},{"style":236},[4447],{"type":47,"value":270},{"type":41,"tag":223,"props":4449,"children":4450},{"style":332},[4451],{"type":47,"value":1955},{"type":41,"tag":223,"props":4453,"children":4454},{"style":236},[4455],{"type":47,"value":325},{"type":41,"tag":223,"props":4457,"children":4458},{"class":225,"line":649},[4459,4464,4468,4472,4476,4480,4485,4489,4493],{"type":41,"tag":223,"props":4460,"children":4461},{"style":230},[4462],{"type":47,"value":4463},"      throw",{"type":41,"tag":223,"props":4465,"children":4466},{"style":236},[4467],{"type":47,"value":2705},{"type":41,"tag":223,"props":4469,"children":4470},{"style":313},[4471],{"type":47,"value":4170},{"type":41,"tag":223,"props":4473,"children":4474},{"style":332},[4475],{"type":47,"value":320},{"type":41,"tag":223,"props":4477,"children":4478},{"style":236},[4479],{"type":47,"value":270},{"type":41,"tag":223,"props":4481,"children":4482},{"style":263},[4483],{"type":47,"value":4484},"Cannot retry",{"type":41,"tag":223,"props":4486,"children":4487},{"style":236},[4488],{"type":47,"value":270},{"type":41,"tag":223,"props":4490,"children":4491},{"style":332},[4492],{"type":47,"value":642},{"type":41,"tag":223,"props":4494,"children":4495},{"style":236},[4496],{"type":47,"value":275},{"type":41,"tag":223,"props":4498,"children":4499},{"class":225,"line":697},[4500],{"type":41,"tag":223,"props":4501,"children":4502},{"style":236},[4503],{"type":47,"value":2099},{"type":41,"tag":223,"props":4505,"children":4506},{"class":225,"line":705},[4507,4511,4515,4520,4524,4528,4532,4536,4541,4545,4550,4555,4560,4565,4569],{"type":41,"tag":223,"props":4508,"children":4509},{"style":230},[4510],{"type":47,"value":655},{"type":41,"tag":223,"props":4512,"children":4513},{"style":236},[4514],{"type":47,"value":239},{"type":41,"tag":223,"props":4516,"children":4517},{"style":332},[4518],{"type":47,"value":4519}," retryAt",{"type":41,"tag":223,"props":4521,"children":4522},{"style":236},[4523],{"type":47,"value":340},{"type":41,"tag":223,"props":4525,"children":4526},{"style":236},[4527],{"type":47,"value":2705},{"type":41,"tag":223,"props":4529,"children":4530},{"style":313},[4531],{"type":47,"value":2710},{"type":41,"tag":223,"props":4533,"children":4534},{"style":332},[4535],{"type":47,"value":320},{"type":41,"tag":223,"props":4537,"children":4538},{"style":242},[4539],{"type":47,"value":4540},"Date",{"type":41,"tag":223,"props":4542,"children":4543},{"style":236},[4544],{"type":47,"value":577},{"type":41,"tag":223,"props":4546,"children":4547},{"style":313},[4548],{"type":47,"value":4549},"now",{"type":41,"tag":223,"props":4551,"children":4552},{"style":332},[4553],{"type":47,"value":4554},"() ",{"type":41,"tag":223,"props":4556,"children":4557},{"style":236},[4558],{"type":47,"value":4559},"+",{"type":41,"tag":223,"props":4561,"children":4562},{"style":391},[4563],{"type":47,"value":4564}," 60000",{"type":41,"tag":223,"props":4566,"children":4567},{"style":332},[4568],{"type":47,"value":1955},{"type":41,"tag":223,"props":4570,"children":4571},{"style":236},[4572],{"type":47,"value":4573},"};\n",{"type":41,"tag":223,"props":4575,"children":4576},{"class":225,"line":2117},[4577],{"type":41,"tag":223,"props":4578,"children":4579},{"style":236},[4580],{"type":47,"value":473},{"type":41,"tag":223,"props":4582,"children":4583},{"class":225,"line":2203},[4584,4588,4592,4596,4600,4604,4608,4612],{"type":41,"tag":223,"props":4585,"children":4586},{"style":313},[4587],{"type":47,"value":482},{"type":41,"tag":223,"props":4589,"children":4590},{"style":236},[4591],{"type":47,"value":340},{"type":41,"tag":223,"props":4593,"children":4594},{"style":297},[4595],{"type":47,"value":491},{"type":41,"tag":223,"props":4597,"children":4598},{"style":236},[4599],{"type":47,"value":496},{"type":41,"tag":223,"props":4601,"children":4602},{"style":499},[4603],{"type":47,"value":502},{"type":41,"tag":223,"props":4605,"children":4606},{"style":236},[4607],{"type":47,"value":642},{"type":41,"tag":223,"props":4609,"children":4610},{"style":297},[4611],{"type":47,"value":559},{"type":41,"tag":223,"props":4613,"children":4614},{"style":236},[4615],{"type":47,"value":375},{"type":41,"tag":223,"props":4617,"children":4618},{"class":225,"line":2211},[4619],{"type":41,"tag":223,"props":4620,"children":4621},{"style":1048},[4622],{"type":47,"value":4623},"    \u002F\u002F Retry specific operations\n",{"type":41,"tag":223,"props":4625,"children":4626},{"class":225,"line":2220},[4627,4631,4635,4639,4643,4647,4651,4656],{"type":41,"tag":223,"props":4628,"children":4629},{"style":297},[4630],{"type":47,"value":1768},{"type":41,"tag":223,"props":4632,"children":4633},{"style":242},[4634],{"type":47,"value":1863},{"type":41,"tag":223,"props":4636,"children":4637},{"style":236},[4638],{"type":47,"value":1778},{"type":41,"tag":223,"props":4640,"children":4641},{"style":230},[4642],{"type":47,"value":1272},{"type":41,"tag":223,"props":4644,"children":4645},{"style":242},[4646],{"type":47,"value":4161},{"type":41,"tag":223,"props":4648,"children":4649},{"style":236},[4650],{"type":47,"value":577},{"type":41,"tag":223,"props":4652,"children":4653},{"style":313},[4654],{"type":47,"value":4655},"onThrow",{"type":41,"tag":223,"props":4657,"children":4658},{"style":332},[4659],{"type":47,"value":3561},{"type":41,"tag":223,"props":4661,"children":4662},{"class":225,"line":2259},[4663,4668,4673,4677,4682,4686,4690,4694],{"type":41,"tag":223,"props":4664,"children":4665},{"style":297},[4666],{"type":47,"value":4667},"      async",{"type":41,"tag":223,"props":4669,"children":4670},{"style":236},[4671],{"type":47,"value":4672}," ()",{"type":41,"tag":223,"props":4674,"children":4675},{"style":297},[4676],{"type":47,"value":559},{"type":41,"tag":223,"props":4678,"children":4679},{"style":313},[4680],{"type":47,"value":4681}," unstableApiCall",{"type":41,"tag":223,"props":4683,"children":4684},{"style":332},[4685],{"type":47,"value":320},{"type":41,"tag":223,"props":4687,"children":4688},{"style":242},[4689],{"type":47,"value":502},{"type":41,"tag":223,"props":4691,"children":4692},{"style":332},[4693],{"type":47,"value":642},{"type":41,"tag":223,"props":4695,"children":4696},{"style":236},[4697],{"type":47,"value":358},{"type":41,"tag":223,"props":4699,"children":4700},{"class":225,"line":2309},[4701,4705,4710,4714,4719],{"type":41,"tag":223,"props":4702,"children":4703},{"style":236},[4704],{"type":47,"value":2265},{"type":41,"tag":223,"props":4706,"children":4707},{"style":332},[4708],{"type":47,"value":4709}," maxAttempts",{"type":41,"tag":223,"props":4711,"children":4712},{"style":236},[4713],{"type":47,"value":340},{"type":41,"tag":223,"props":4715,"children":4716},{"style":391},[4717],{"type":47,"value":4718}," 3",{"type":41,"tag":223,"props":4720,"children":4721},{"style":236},[4722],{"type":47,"value":4723}," }\n",{"type":41,"tag":223,"props":4725,"children":4726},{"class":225,"line":2358},[4727,4732],{"type":41,"tag":223,"props":4728,"children":4729},{"style":332},[4730],{"type":47,"value":4731},"    )",{"type":41,"tag":223,"props":4733,"children":4734},{"style":236},[4735],{"type":47,"value":275},{"type":41,"tag":223,"props":4737,"children":4738},{"class":225,"line":2371},[4739],{"type":41,"tag":223,"props":4740,"children":4741},{"emptyLinePlaceholder":282},[4742],{"type":47,"value":285},{"type":41,"tag":223,"props":4744,"children":4745},{"class":225,"line":2379},[4746],{"type":41,"tag":223,"props":4747,"children":4748},{"style":1048},[4749],{"type":47,"value":4750},"    \u002F\u002F HTTP retries with conditions\n",{"type":41,"tag":223,"props":4752,"children":4753},{"class":225,"line":3379},[4754,4758,4763,4767,4771,4775,4779,4784,4788,4792,4797,4801,4805],{"type":41,"tag":223,"props":4755,"children":4756},{"style":297},[4757],{"type":47,"value":1768},{"type":41,"tag":223,"props":4759,"children":4760},{"style":242},[4761],{"type":47,"value":4762}," response",{"type":41,"tag":223,"props":4764,"children":4765},{"style":236},[4766],{"type":47,"value":1778},{"type":41,"tag":223,"props":4768,"children":4769},{"style":230},[4770],{"type":47,"value":1272},{"type":41,"tag":223,"props":4772,"children":4773},{"style":242},[4774],{"type":47,"value":4161},{"type":41,"tag":223,"props":4776,"children":4777},{"style":236},[4778],{"type":47,"value":577},{"type":41,"tag":223,"props":4780,"children":4781},{"style":313},[4782],{"type":47,"value":4783},"fetch",{"type":41,"tag":223,"props":4785,"children":4786},{"style":332},[4787],{"type":47,"value":320},{"type":41,"tag":223,"props":4789,"children":4790},{"style":236},[4791],{"type":47,"value":270},{"type":41,"tag":223,"props":4793,"children":4794},{"style":263},[4795],{"type":47,"value":4796},"https:\u002F\u002Fapi.example.com",{"type":41,"tag":223,"props":4798,"children":4799},{"style":236},[4800],{"type":47,"value":270},{"type":41,"tag":223,"props":4802,"children":4803},{"style":236},[4804],{"type":47,"value":1320},{"type":41,"tag":223,"props":4806,"children":4807},{"style":236},[4808],{"type":47,"value":375},{"type":41,"tag":223,"props":4810,"children":4811},{"class":225,"line":3388},[4812,4817,4821],{"type":41,"tag":223,"props":4813,"children":4814},{"style":332},[4815],{"type":47,"value":4816},"      retry",{"type":41,"tag":223,"props":4818,"children":4819},{"style":236},[4820],{"type":47,"value":340},{"type":41,"tag":223,"props":4822,"children":4823},{"style":236},[4824],{"type":47,"value":375},{"type":41,"tag":223,"props":4826,"children":4827},{"class":225,"line":3422},[4828,4833,4837,4841],{"type":41,"tag":223,"props":4829,"children":4830},{"style":332},[4831],{"type":47,"value":4832},"        maxAttempts",{"type":41,"tag":223,"props":4834,"children":4835},{"style":236},[4836],{"type":47,"value":340},{"type":41,"tag":223,"props":4838,"children":4839},{"style":391},[4840],{"type":47,"value":2651},{"type":41,"tag":223,"props":4842,"children":4843},{"style":236},[4844],{"type":47,"value":358},{"type":41,"tag":223,"props":4846,"children":4847},{"class":225,"line":3438},[4848,4853,4857,4861,4866,4870,4875,4879,4883,4888,4893,4898,4902,4907,4912,4916,4920,4924,4929,4933],{"type":41,"tag":223,"props":4849,"children":4850},{"style":313},[4851],{"type":47,"value":4852},"        condition",{"type":41,"tag":223,"props":4854,"children":4855},{"style":236},[4856],{"type":47,"value":340},{"type":41,"tag":223,"props":4858,"children":4859},{"style":236},[4860],{"type":47,"value":496},{"type":41,"tag":223,"props":4862,"children":4863},{"style":499},[4864],{"type":47,"value":4865},"res",{"type":41,"tag":223,"props":4867,"children":4868},{"style":236},[4869],{"type":47,"value":1320},{"type":41,"tag":223,"props":4871,"children":4872},{"style":499},[4873],{"type":47,"value":4874}," err",{"type":41,"tag":223,"props":4876,"children":4877},{"style":236},[4878],{"type":47,"value":642},{"type":41,"tag":223,"props":4880,"children":4881},{"style":297},[4882],{"type":47,"value":559},{"type":41,"tag":223,"props":4884,"children":4885},{"style":242},[4886],{"type":47,"value":4887}," res",{"type":41,"tag":223,"props":4889,"children":4890},{"style":236},[4891],{"type":47,"value":4892},"?.",{"type":41,"tag":223,"props":4894,"children":4895},{"style":242},[4896],{"type":47,"value":4897},"status",{"type":41,"tag":223,"props":4899,"children":4900},{"style":236},[4901],{"type":47,"value":4434},{"type":41,"tag":223,"props":4903,"children":4904},{"style":391},[4905],{"type":47,"value":4906}," 429",{"type":41,"tag":223,"props":4908,"children":4909},{"style":236},[4910],{"type":47,"value":4911}," ||",{"type":41,"tag":223,"props":4913,"children":4914},{"style":242},[4915],{"type":47,"value":4887},{"type":41,"tag":223,"props":4917,"children":4918},{"style":236},[4919],{"type":47,"value":4892},{"type":41,"tag":223,"props":4921,"children":4922},{"style":242},[4923],{"type":47,"value":4897},{"type":41,"tag":223,"props":4925,"children":4926},{"style":236},[4927],{"type":47,"value":4928}," >=",{"type":41,"tag":223,"props":4930,"children":4931},{"style":391},[4932],{"type":47,"value":438},{"type":41,"tag":223,"props":4934,"children":4935},{"style":236},[4936],{"type":47,"value":358},{"type":41,"tag":223,"props":4938,"children":4939},{"class":225,"line":3476},[4940],{"type":41,"tag":223,"props":4941,"children":4942},{"style":236},[4943],{"type":47,"value":4944},"      },\n",{"type":41,"tag":223,"props":4946,"children":4947},{"class":225,"line":24},[4948,4952,4956],{"type":41,"tag":223,"props":4949,"children":4950},{"style":236},[4951],{"type":47,"value":2025},{"type":41,"tag":223,"props":4953,"children":4954},{"style":332},[4955],{"type":47,"value":642},{"type":41,"tag":223,"props":4957,"children":4958},{"style":236},[4959],{"type":47,"value":275},{"type":41,"tag":223,"props":4961,"children":4962},{"class":225,"line":3505},[4963],{"type":41,"tag":223,"props":4964,"children":4965},{"style":236},[4966],{"type":47,"value":473},{"type":41,"tag":223,"props":4968,"children":4970},{"class":225,"line":4969},32,[4971,4975,4979],{"type":41,"tag":223,"props":4972,"children":4973},{"style":236},[4974],{"type":47,"value":628},{"type":41,"tag":223,"props":4976,"children":4977},{"style":242},[4978],{"type":47,"value":642},{"type":41,"tag":223,"props":4980,"children":4981},{"style":236},[4982],{"type":47,"value":275},{"type":41,"tag":56,"props":4984,"children":4986},{"id":4985},"scheduled-tasks-cron",[4987],{"type":47,"value":4988},"Scheduled Tasks (Cron)",{"type":41,"tag":212,"props":4990,"children":4992},{"className":214,"code":4991,"language":216,"meta":217,"style":217},"import { schedules } from \"@trigger.dev\u002Fsdk\";\n\n\u002F\u002F Declarative schedule\nexport const dailyTask = schedules.task({\n  id: \"daily-cleanup\",\n  cron: \"0 0 * * *\", \u002F\u002F Midnight UTC\n  run: async (payload) => {\n    \u002F\u002F payload.timestamp - scheduled time\n    \u002F\u002F payload.timezone - IANA timezone\n    \u002F\u002F payload.scheduleId - schedule identifier\n  },\n});\n\n\u002F\u002F With timezone\nexport const tokyoTask = schedules.task({\n  id: \"tokyo-morning\",\n  cron: { pattern: \"0 9 * * *\", timezone: \"Asia\u002FTokyo\" },\n  run: async () => {},\n});\n\n\u002F\u002F Dynamic\u002Fmulti-tenant schedules\nawait schedules.create({\n  task: \"reminder-task\",\n  cron: \"0 8 * * *\",\n  timezone: \"America\u002FNew_York\",\n  externalId: userId,\n  deduplicationKey: `${userId}-daily`,\n});\n",[4993],{"type":41,"tag":112,"props":4994,"children":4995},{"__ignoreMap":217},[4996,5036,5043,5051,5092,5120,5154,5189,5197,5205,5213,5220,5235,5242,5250,5290,5318,5385,5412,5427,5434,5442,5469,5498,5526,5555,5575,5613],{"type":41,"tag":223,"props":4997,"children":4998},{"class":225,"line":226},[4999,5003,5007,5012,5016,5020,5024,5028,5032],{"type":41,"tag":223,"props":5000,"children":5001},{"style":230},[5002],{"type":47,"value":233},{"type":41,"tag":223,"props":5004,"children":5005},{"style":236},[5006],{"type":47,"value":239},{"type":41,"tag":223,"props":5008,"children":5009},{"style":242},[5010],{"type":47,"value":5011}," schedules",{"type":41,"tag":223,"props":5013,"children":5014},{"style":236},[5015],{"type":47,"value":250},{"type":41,"tag":223,"props":5017,"children":5018},{"style":230},[5019],{"type":47,"value":255},{"type":41,"tag":223,"props":5021,"children":5022},{"style":236},[5023],{"type":47,"value":260},{"type":41,"tag":223,"props":5025,"children":5026},{"style":263},[5027],{"type":47,"value":117},{"type":41,"tag":223,"props":5029,"children":5030},{"style":236},[5031],{"type":47,"value":270},{"type":41,"tag":223,"props":5033,"children":5034},{"style":236},[5035],{"type":47,"value":275},{"type":41,"tag":223,"props":5037,"children":5038},{"class":225,"line":278},[5039],{"type":41,"tag":223,"props":5040,"children":5041},{"emptyLinePlaceholder":282},[5042],{"type":47,"value":285},{"type":41,"tag":223,"props":5044,"children":5045},{"class":225,"line":288},[5046],{"type":41,"tag":223,"props":5047,"children":5048},{"style":1048},[5049],{"type":47,"value":5050},"\u002F\u002F Declarative schedule\n",{"type":41,"tag":223,"props":5052,"children":5053},{"class":225,"line":328},[5054,5058,5062,5067,5071,5075,5079,5084,5088],{"type":41,"tag":223,"props":5055,"children":5056},{"style":230},[5057],{"type":47,"value":294},{"type":41,"tag":223,"props":5059,"children":5060},{"style":297},[5061],{"type":47,"value":300},{"type":41,"tag":223,"props":5063,"children":5064},{"style":242},[5065],{"type":47,"value":5066}," dailyTask ",{"type":41,"tag":223,"props":5068,"children":5069},{"style":236},[5070],{"type":47,"value":310},{"type":41,"tag":223,"props":5072,"children":5073},{"style":242},[5074],{"type":47,"value":5011},{"type":41,"tag":223,"props":5076,"children":5077},{"style":236},[5078],{"type":47,"value":577},{"type":41,"tag":223,"props":5080,"children":5081},{"style":313},[5082],{"type":47,"value":5083},"task",{"type":41,"tag":223,"props":5085,"children":5086},{"style":242},[5087],{"type":47,"value":320},{"type":41,"tag":223,"props":5089,"children":5090},{"style":236},[5091],{"type":47,"value":325},{"type":41,"tag":223,"props":5093,"children":5094},{"class":225,"line":28},[5095,5099,5103,5107,5112,5116],{"type":41,"tag":223,"props":5096,"children":5097},{"style":332},[5098],{"type":47,"value":335},{"type":41,"tag":223,"props":5100,"children":5101},{"style":236},[5102],{"type":47,"value":340},{"type":41,"tag":223,"props":5104,"children":5105},{"style":236},[5106],{"type":47,"value":260},{"type":41,"tag":223,"props":5108,"children":5109},{"style":263},[5110],{"type":47,"value":5111},"daily-cleanup",{"type":41,"tag":223,"props":5113,"children":5114},{"style":236},[5115],{"type":47,"value":270},{"type":41,"tag":223,"props":5117,"children":5118},{"style":236},[5119],{"type":47,"value":358},{"type":41,"tag":223,"props":5121,"children":5122},{"class":225,"line":378},[5123,5128,5132,5136,5141,5145,5149],{"type":41,"tag":223,"props":5124,"children":5125},{"style":332},[5126],{"type":47,"value":5127},"  cron",{"type":41,"tag":223,"props":5129,"children":5130},{"style":236},[5131],{"type":47,"value":340},{"type":41,"tag":223,"props":5133,"children":5134},{"style":236},[5135],{"type":47,"value":260},{"type":41,"tag":223,"props":5137,"children":5138},{"style":263},[5139],{"type":47,"value":5140},"0 0 * * *",{"type":41,"tag":223,"props":5142,"children":5143},{"style":236},[5144],{"type":47,"value":270},{"type":41,"tag":223,"props":5146,"children":5147},{"style":236},[5148],{"type":47,"value":1320},{"type":41,"tag":223,"props":5150,"children":5151},{"style":1048},[5152],{"type":47,"value":5153}," \u002F\u002F Midnight UTC\n",{"type":41,"tag":223,"props":5155,"children":5156},{"class":225,"line":401},[5157,5161,5165,5169,5173,5177,5181,5185],{"type":41,"tag":223,"props":5158,"children":5159},{"style":313},[5160],{"type":47,"value":482},{"type":41,"tag":223,"props":5162,"children":5163},{"style":236},[5164],{"type":47,"value":340},{"type":41,"tag":223,"props":5166,"children":5167},{"style":297},[5168],{"type":47,"value":491},{"type":41,"tag":223,"props":5170,"children":5171},{"style":236},[5172],{"type":47,"value":496},{"type":41,"tag":223,"props":5174,"children":5175},{"style":499},[5176],{"type":47,"value":502},{"type":41,"tag":223,"props":5178,"children":5179},{"style":236},[5180],{"type":47,"value":642},{"type":41,"tag":223,"props":5182,"children":5183},{"style":297},[5184],{"type":47,"value":559},{"type":41,"tag":223,"props":5186,"children":5187},{"style":236},[5188],{"type":47,"value":375},{"type":41,"tag":223,"props":5190,"children":5191},{"class":225,"line":423},[5192],{"type":41,"tag":223,"props":5193,"children":5194},{"style":1048},[5195],{"type":47,"value":5196},"    \u002F\u002F payload.timestamp - scheduled time\n",{"type":41,"tag":223,"props":5198,"children":5199},{"class":225,"line":445},[5200],{"type":41,"tag":223,"props":5201,"children":5202},{"style":1048},[5203],{"type":47,"value":5204},"    \u002F\u002F payload.timezone - IANA timezone\n",{"type":41,"tag":223,"props":5206,"children":5207},{"class":225,"line":467},[5208],{"type":41,"tag":223,"props":5209,"children":5210},{"style":1048},[5211],{"type":47,"value":5212},"    \u002F\u002F payload.scheduleId - schedule identifier\n",{"type":41,"tag":223,"props":5214,"children":5215},{"class":225,"line":476},[5216],{"type":41,"tag":223,"props":5217,"children":5218},{"style":236},[5219],{"type":47,"value":473},{"type":41,"tag":223,"props":5221,"children":5222},{"class":225,"line":566},[5223,5227,5231],{"type":41,"tag":223,"props":5224,"children":5225},{"style":236},[5226],{"type":47,"value":628},{"type":41,"tag":223,"props":5228,"children":5229},{"style":242},[5230],{"type":47,"value":642},{"type":41,"tag":223,"props":5232,"children":5233},{"style":236},[5234],{"type":47,"value":275},{"type":41,"tag":223,"props":5236,"children":5237},{"class":225,"line":649},[5238],{"type":41,"tag":223,"props":5239,"children":5240},{"emptyLinePlaceholder":282},[5241],{"type":47,"value":285},{"type":41,"tag":223,"props":5243,"children":5244},{"class":225,"line":697},[5245],{"type":41,"tag":223,"props":5246,"children":5247},{"style":1048},[5248],{"type":47,"value":5249},"\u002F\u002F With timezone\n",{"type":41,"tag":223,"props":5251,"children":5252},{"class":225,"line":705},[5253,5257,5261,5266,5270,5274,5278,5282,5286],{"type":41,"tag":223,"props":5254,"children":5255},{"style":230},[5256],{"type":47,"value":294},{"type":41,"tag":223,"props":5258,"children":5259},{"style":297},[5260],{"type":47,"value":300},{"type":41,"tag":223,"props":5262,"children":5263},{"style":242},[5264],{"type":47,"value":5265}," tokyoTask ",{"type":41,"tag":223,"props":5267,"children":5268},{"style":236},[5269],{"type":47,"value":310},{"type":41,"tag":223,"props":5271,"children":5272},{"style":242},[5273],{"type":47,"value":5011},{"type":41,"tag":223,"props":5275,"children":5276},{"style":236},[5277],{"type":47,"value":577},{"type":41,"tag":223,"props":5279,"children":5280},{"style":313},[5281],{"type":47,"value":5083},{"type":41,"tag":223,"props":5283,"children":5284},{"style":242},[5285],{"type":47,"value":320},{"type":41,"tag":223,"props":5287,"children":5288},{"style":236},[5289],{"type":47,"value":325},{"type":41,"tag":223,"props":5291,"children":5292},{"class":225,"line":2117},[5293,5297,5301,5305,5310,5314],{"type":41,"tag":223,"props":5294,"children":5295},{"style":332},[5296],{"type":47,"value":335},{"type":41,"tag":223,"props":5298,"children":5299},{"style":236},[5300],{"type":47,"value":340},{"type":41,"tag":223,"props":5302,"children":5303},{"style":236},[5304],{"type":47,"value":260},{"type":41,"tag":223,"props":5306,"children":5307},{"style":263},[5308],{"type":47,"value":5309},"tokyo-morning",{"type":41,"tag":223,"props":5311,"children":5312},{"style":236},[5313],{"type":47,"value":270},{"type":41,"tag":223,"props":5315,"children":5316},{"style":236},[5317],{"type":47,"value":358},{"type":41,"tag":223,"props":5319,"children":5320},{"class":225,"line":2203},[5321,5325,5329,5333,5338,5342,5346,5351,5355,5359,5364,5368,5372,5377,5381],{"type":41,"tag":223,"props":5322,"children":5323},{"style":332},[5324],{"type":47,"value":5127},{"type":41,"tag":223,"props":5326,"children":5327},{"style":236},[5328],{"type":47,"value":340},{"type":41,"tag":223,"props":5330,"children":5331},{"style":236},[5332],{"type":47,"value":239},{"type":41,"tag":223,"props":5334,"children":5335},{"style":332},[5336],{"type":47,"value":5337}," pattern",{"type":41,"tag":223,"props":5339,"children":5340},{"style":236},[5341],{"type":47,"value":340},{"type":41,"tag":223,"props":5343,"children":5344},{"style":236},[5345],{"type":47,"value":260},{"type":41,"tag":223,"props":5347,"children":5348},{"style":263},[5349],{"type":47,"value":5350},"0 9 * * *",{"type":41,"tag":223,"props":5352,"children":5353},{"style":236},[5354],{"type":47,"value":270},{"type":41,"tag":223,"props":5356,"children":5357},{"style":236},[5358],{"type":47,"value":1320},{"type":41,"tag":223,"props":5360,"children":5361},{"style":332},[5362],{"type":47,"value":5363}," timezone",{"type":41,"tag":223,"props":5365,"children":5366},{"style":236},[5367],{"type":47,"value":340},{"type":41,"tag":223,"props":5369,"children":5370},{"style":236},[5371],{"type":47,"value":260},{"type":41,"tag":223,"props":5373,"children":5374},{"style":263},[5375],{"type":47,"value":5376},"Asia\u002FTokyo",{"type":41,"tag":223,"props":5378,"children":5379},{"style":236},[5380],{"type":47,"value":270},{"type":41,"tag":223,"props":5382,"children":5383},{"style":236},[5384],{"type":47,"value":1568},{"type":41,"tag":223,"props":5386,"children":5387},{"class":225,"line":2211},[5388,5392,5396,5400,5404,5408],{"type":41,"tag":223,"props":5389,"children":5390},{"style":313},[5391],{"type":47,"value":482},{"type":41,"tag":223,"props":5393,"children":5394},{"style":236},[5395],{"type":47,"value":340},{"type":41,"tag":223,"props":5397,"children":5398},{"style":297},[5399],{"type":47,"value":491},{"type":41,"tag":223,"props":5401,"children":5402},{"style":236},[5403],{"type":47,"value":4672},{"type":41,"tag":223,"props":5405,"children":5406},{"style":297},[5407],{"type":47,"value":559},{"type":41,"tag":223,"props":5409,"children":5410},{"style":236},[5411],{"type":47,"value":3354},{"type":41,"tag":223,"props":5413,"children":5414},{"class":225,"line":2220},[5415,5419,5423],{"type":41,"tag":223,"props":5416,"children":5417},{"style":236},[5418],{"type":47,"value":628},{"type":41,"tag":223,"props":5420,"children":5421},{"style":242},[5422],{"type":47,"value":642},{"type":41,"tag":223,"props":5424,"children":5425},{"style":236},[5426],{"type":47,"value":275},{"type":41,"tag":223,"props":5428,"children":5429},{"class":225,"line":2259},[5430],{"type":41,"tag":223,"props":5431,"children":5432},{"emptyLinePlaceholder":282},[5433],{"type":47,"value":285},{"type":41,"tag":223,"props":5435,"children":5436},{"class":225,"line":2309},[5437],{"type":41,"tag":223,"props":5438,"children":5439},{"style":1048},[5440],{"type":47,"value":5441},"\u002F\u002F Dynamic\u002Fmulti-tenant schedules\n",{"type":41,"tag":223,"props":5443,"children":5444},{"class":225,"line":2358},[5445,5449,5453,5457,5461,5465],{"type":41,"tag":223,"props":5446,"children":5447},{"style":230},[5448],{"type":47,"value":3394},{"type":41,"tag":223,"props":5450,"children":5451},{"style":242},[5452],{"type":47,"value":5011},{"type":41,"tag":223,"props":5454,"children":5455},{"style":236},[5456],{"type":47,"value":577},{"type":41,"tag":223,"props":5458,"children":5459},{"style":313},[5460],{"type":47,"value":3953},{"type":41,"tag":223,"props":5462,"children":5463},{"style":242},[5464],{"type":47,"value":320},{"type":41,"tag":223,"props":5466,"children":5467},{"style":236},[5468],{"type":47,"value":325},{"type":41,"tag":223,"props":5470,"children":5471},{"class":225,"line":2371},[5472,5477,5481,5485,5490,5494],{"type":41,"tag":223,"props":5473,"children":5474},{"style":332},[5475],{"type":47,"value":5476},"  task",{"type":41,"tag":223,"props":5478,"children":5479},{"style":236},[5480],{"type":47,"value":340},{"type":41,"tag":223,"props":5482,"children":5483},{"style":236},[5484],{"type":47,"value":260},{"type":41,"tag":223,"props":5486,"children":5487},{"style":263},[5488],{"type":47,"value":5489},"reminder-task",{"type":41,"tag":223,"props":5491,"children":5492},{"style":236},[5493],{"type":47,"value":270},{"type":41,"tag":223,"props":5495,"children":5496},{"style":236},[5497],{"type":47,"value":358},{"type":41,"tag":223,"props":5499,"children":5500},{"class":225,"line":2379},[5501,5505,5509,5513,5518,5522],{"type":41,"tag":223,"props":5502,"children":5503},{"style":332},[5504],{"type":47,"value":5127},{"type":41,"tag":223,"props":5506,"children":5507},{"style":236},[5508],{"type":47,"value":340},{"type":41,"tag":223,"props":5510,"children":5511},{"style":236},[5512],{"type":47,"value":260},{"type":41,"tag":223,"props":5514,"children":5515},{"style":263},[5516],{"type":47,"value":5517},"0 8 * * *",{"type":41,"tag":223,"props":5519,"children":5520},{"style":236},[5521],{"type":47,"value":270},{"type":41,"tag":223,"props":5523,"children":5524},{"style":236},[5525],{"type":47,"value":358},{"type":41,"tag":223,"props":5527,"children":5528},{"class":225,"line":3379},[5529,5534,5538,5542,5547,5551],{"type":41,"tag":223,"props":5530,"children":5531},{"style":332},[5532],{"type":47,"value":5533},"  timezone",{"type":41,"tag":223,"props":5535,"children":5536},{"style":236},[5537],{"type":47,"value":340},{"type":41,"tag":223,"props":5539,"children":5540},{"style":236},[5541],{"type":47,"value":260},{"type":41,"tag":223,"props":5543,"children":5544},{"style":263},[5545],{"type":47,"value":5546},"America\u002FNew_York",{"type":41,"tag":223,"props":5548,"children":5549},{"style":236},[5550],{"type":47,"value":270},{"type":41,"tag":223,"props":5552,"children":5553},{"style":236},[5554],{"type":47,"value":358},{"type":41,"tag":223,"props":5556,"children":5557},{"class":225,"line":3388},[5558,5563,5567,5571],{"type":41,"tag":223,"props":5559,"children":5560},{"style":332},[5561],{"type":47,"value":5562},"  externalId",{"type":41,"tag":223,"props":5564,"children":5565},{"style":236},[5566],{"type":47,"value":340},{"type":41,"tag":223,"props":5568,"children":5569},{"style":242},[5570],{"type":47,"value":515},{"type":41,"tag":223,"props":5572,"children":5573},{"style":236},[5574],{"type":47,"value":358},{"type":41,"tag":223,"props":5576,"children":5577},{"class":225,"line":3422},[5578,5583,5587,5592,5596,5600,5605,5609],{"type":41,"tag":223,"props":5579,"children":5580},{"style":332},[5581],{"type":47,"value":5582},"  deduplicationKey",{"type":41,"tag":223,"props":5584,"children":5585},{"style":236},[5586],{"type":47,"value":340},{"type":41,"tag":223,"props":5588,"children":5589},{"style":236},[5590],{"type":47,"value":5591}," `${",{"type":41,"tag":223,"props":5593,"children":5594},{"style":242},[5595],{"type":47,"value":3465},{"type":41,"tag":223,"props":5597,"children":5598},{"style":236},[5599],{"type":47,"value":628},{"type":41,"tag":223,"props":5601,"children":5602},{"style":263},[5603],{"type":47,"value":5604},"-daily",{"type":41,"tag":223,"props":5606,"children":5607},{"style":236},[5608],{"type":47,"value":591},{"type":41,"tag":223,"props":5610,"children":5611},{"style":236},[5612],{"type":47,"value":358},{"type":41,"tag":223,"props":5614,"children":5615},{"class":225,"line":3438},[5616,5620,5624],{"type":41,"tag":223,"props":5617,"children":5618},{"style":236},[5619],{"type":47,"value":628},{"type":41,"tag":223,"props":5621,"children":5622},{"style":242},[5623],{"type":47,"value":642},{"type":41,"tag":223,"props":5625,"children":5626},{"style":236},[5627],{"type":47,"value":275},{"type":41,"tag":56,"props":5629,"children":5631},{"id":5630},"metadata-progress",[5632],{"type":47,"value":5633},"Metadata & Progress",{"type":41,"tag":212,"props":5635,"children":5637},{"className":214,"code":5636,"language":216,"meta":217,"style":217},"import { task, metadata } from \"@trigger.dev\u002Fsdk\";\n\nexport const batchProcessor = task({\n  id: \"batch-processor\",\n  run: async (payload: { items: any[] }) => {\n    metadata.set(\"progress\", 0).set(\"total\", payload.items.length);\n\n    for (let i = 0; i \u003C payload.items.length; i++) {\n      await processItem(payload.items[i]);\n      metadata.set(\"progress\", ((i + 1) \u002F payload.items.length) * 100);\n    }\n\n    metadata.set(\"status\", \"completed\");\n  },\n});\n",[5638],{"type":41,"tag":112,"props":5639,"children":5640},{"__ignoreMap":217},[5641,5689,5696,5728,5756,5815,5920,5927,6011,6058,6163,6170,6177,6233,6240],{"type":41,"tag":223,"props":5642,"children":5643},{"class":225,"line":226},[5644,5648,5652,5656,5660,5665,5669,5673,5677,5681,5685],{"type":41,"tag":223,"props":5645,"children":5646},{"style":230},[5647],{"type":47,"value":233},{"type":41,"tag":223,"props":5649,"children":5650},{"style":236},[5651],{"type":47,"value":239},{"type":41,"tag":223,"props":5653,"children":5654},{"style":242},[5655],{"type":47,"value":245},{"type":41,"tag":223,"props":5657,"children":5658},{"style":236},[5659],{"type":47,"value":1320},{"type":41,"tag":223,"props":5661,"children":5662},{"style":242},[5663],{"type":47,"value":5664}," metadata",{"type":41,"tag":223,"props":5666,"children":5667},{"style":236},[5668],{"type":47,"value":250},{"type":41,"tag":223,"props":5670,"children":5671},{"style":230},[5672],{"type":47,"value":255},{"type":41,"tag":223,"props":5674,"children":5675},{"style":236},[5676],{"type":47,"value":260},{"type":41,"tag":223,"props":5678,"children":5679},{"style":263},[5680],{"type":47,"value":117},{"type":41,"tag":223,"props":5682,"children":5683},{"style":236},[5684],{"type":47,"value":270},{"type":41,"tag":223,"props":5686,"children":5687},{"style":236},[5688],{"type":47,"value":275},{"type":41,"tag":223,"props":5690,"children":5691},{"class":225,"line":278},[5692],{"type":41,"tag":223,"props":5693,"children":5694},{"emptyLinePlaceholder":282},[5695],{"type":47,"value":285},{"type":41,"tag":223,"props":5697,"children":5698},{"class":225,"line":288},[5699,5703,5707,5712,5716,5720,5724],{"type":41,"tag":223,"props":5700,"children":5701},{"style":230},[5702],{"type":47,"value":294},{"type":41,"tag":223,"props":5704,"children":5705},{"style":297},[5706],{"type":47,"value":300},{"type":41,"tag":223,"props":5708,"children":5709},{"style":242},[5710],{"type":47,"value":5711}," batchProcessor ",{"type":41,"tag":223,"props":5713,"children":5714},{"style":236},[5715],{"type":47,"value":310},{"type":41,"tag":223,"props":5717,"children":5718},{"style":313},[5719],{"type":47,"value":245},{"type":41,"tag":223,"props":5721,"children":5722},{"style":242},[5723],{"type":47,"value":320},{"type":41,"tag":223,"props":5725,"children":5726},{"style":236},[5727],{"type":47,"value":325},{"type":41,"tag":223,"props":5729,"children":5730},{"class":225,"line":328},[5731,5735,5739,5743,5748,5752],{"type":41,"tag":223,"props":5732,"children":5733},{"style":332},[5734],{"type":47,"value":335},{"type":41,"tag":223,"props":5736,"children":5737},{"style":236},[5738],{"type":47,"value":340},{"type":41,"tag":223,"props":5740,"children":5741},{"style":236},[5742],{"type":47,"value":260},{"type":41,"tag":223,"props":5744,"children":5745},{"style":263},[5746],{"type":47,"value":5747},"batch-processor",{"type":41,"tag":223,"props":5749,"children":5750},{"style":236},[5751],{"type":47,"value":270},{"type":41,"tag":223,"props":5753,"children":5754},{"style":236},[5755],{"type":47,"value":358},{"type":41,"tag":223,"props":5757,"children":5758},{"class":225,"line":28},[5759,5763,5767,5771,5775,5779,5783,5787,5791,5795,5799,5803,5807,5811],{"type":41,"tag":223,"props":5760,"children":5761},{"style":313},[5762],{"type":47,"value":482},{"type":41,"tag":223,"props":5764,"children":5765},{"style":236},[5766],{"type":47,"value":340},{"type":41,"tag":223,"props":5768,"children":5769},{"style":297},[5770],{"type":47,"value":491},{"type":41,"tag":223,"props":5772,"children":5773},{"style":236},[5774],{"type":47,"value":496},{"type":41,"tag":223,"props":5776,"children":5777},{"style":499},[5778],{"type":47,"value":502},{"type":41,"tag":223,"props":5780,"children":5781},{"style":236},[5782],{"type":47,"value":340},{"type":41,"tag":223,"props":5784,"children":5785},{"style":236},[5786],{"type":47,"value":239},{"type":41,"tag":223,"props":5788,"children":5789},{"style":332},[5790],{"type":47,"value":633},{"type":41,"tag":223,"props":5792,"children":5793},{"style":236},[5794],{"type":47,"value":340},{"type":41,"tag":223,"props":5796,"children":5797},{"style":522},[5798],{"type":47,"value":544},{"type":41,"tag":223,"props":5800,"children":5801},{"style":242},[5802],{"type":47,"value":549},{"type":41,"tag":223,"props":5804,"children":5805},{"style":236},[5806],{"type":47,"value":554},{"type":41,"tag":223,"props":5808,"children":5809},{"style":297},[5810],{"type":47,"value":559},{"type":41,"tag":223,"props":5812,"children":5813},{"style":236},[5814],{"type":47,"value":375},{"type":41,"tag":223,"props":5816,"children":5817},{"class":225,"line":378},[5818,5823,5827,5832,5836,5840,5845,5849,5853,5858,5862,5866,5870,5874,5878,5883,5887,5891,5895,5899,5904,5908,5912,5916],{"type":41,"tag":223,"props":5819,"children":5820},{"style":242},[5821],{"type":47,"value":5822},"    metadata",{"type":41,"tag":223,"props":5824,"children":5825},{"style":236},[5826],{"type":47,"value":577},{"type":41,"tag":223,"props":5828,"children":5829},{"style":313},[5830],{"type":47,"value":5831},"set",{"type":41,"tag":223,"props":5833,"children":5834},{"style":332},[5835],{"type":47,"value":320},{"type":41,"tag":223,"props":5837,"children":5838},{"style":236},[5839],{"type":47,"value":270},{"type":41,"tag":223,"props":5841,"children":5842},{"style":263},[5843],{"type":47,"value":5844},"progress",{"type":41,"tag":223,"props":5846,"children":5847},{"style":236},[5848],{"type":47,"value":270},{"type":41,"tag":223,"props":5850,"children":5851},{"style":236},[5852],{"type":47,"value":1320},{"type":41,"tag":223,"props":5854,"children":5855},{"style":391},[5856],{"type":47,"value":5857}," 0",{"type":41,"tag":223,"props":5859,"children":5860},{"style":332},[5861],{"type":47,"value":642},{"type":41,"tag":223,"props":5863,"children":5864},{"style":236},[5865],{"type":47,"value":577},{"type":41,"tag":223,"props":5867,"children":5868},{"style":313},[5869],{"type":47,"value":5831},{"type":41,"tag":223,"props":5871,"children":5872},{"style":332},[5873],{"type":47,"value":320},{"type":41,"tag":223,"props":5875,"children":5876},{"style":236},[5877],{"type":47,"value":270},{"type":41,"tag":223,"props":5879,"children":5880},{"style":263},[5881],{"type":47,"value":5882},"total",{"type":41,"tag":223,"props":5884,"children":5885},{"style":236},[5886],{"type":47,"value":270},{"type":41,"tag":223,"props":5888,"children":5889},{"style":236},[5890],{"type":47,"value":1320},{"type":41,"tag":223,"props":5892,"children":5893},{"style":242},[5894],{"type":47,"value":673},{"type":41,"tag":223,"props":5896,"children":5897},{"style":236},[5898],{"type":47,"value":577},{"type":41,"tag":223,"props":5900,"children":5901},{"style":242},[5902],{"type":47,"value":5903},"items",{"type":41,"tag":223,"props":5905,"children":5906},{"style":236},[5907],{"type":47,"value":577},{"type":41,"tag":223,"props":5909,"children":5910},{"style":242},[5911],{"type":47,"value":623},{"type":41,"tag":223,"props":5913,"children":5914},{"style":332},[5915],{"type":47,"value":642},{"type":41,"tag":223,"props":5917,"children":5918},{"style":236},[5919],{"type":47,"value":275},{"type":41,"tag":223,"props":5921,"children":5922},{"class":225,"line":401},[5923],{"type":41,"tag":223,"props":5924,"children":5925},{"emptyLinePlaceholder":282},[5926],{"type":47,"value":285},{"type":41,"tag":223,"props":5928,"children":5929},{"class":225,"line":423},[5930,5935,5939,5944,5949,5953,5957,5961,5965,5970,5974,5978,5982,5986,5990,5994,5998,6003,6007],{"type":41,"tag":223,"props":5931,"children":5932},{"style":230},[5933],{"type":47,"value":5934},"    for",{"type":41,"tag":223,"props":5936,"children":5937},{"style":332},[5938],{"type":47,"value":496},{"type":41,"tag":223,"props":5940,"children":5941},{"style":297},[5942],{"type":47,"value":5943},"let",{"type":41,"tag":223,"props":5945,"children":5946},{"style":242},[5947],{"type":47,"value":5948}," i",{"type":41,"tag":223,"props":5950,"children":5951},{"style":236},[5952],{"type":47,"value":1778},{"type":41,"tag":223,"props":5954,"children":5955},{"style":391},[5956],{"type":47,"value":5857},{"type":41,"tag":223,"props":5958,"children":5959},{"style":236},[5960],{"type":47,"value":530},{"type":41,"tag":223,"props":5962,"children":5963},{"style":242},[5964],{"type":47,"value":5948},{"type":41,"tag":223,"props":5966,"children":5967},{"style":236},[5968],{"type":47,"value":5969}," \u003C",{"type":41,"tag":223,"props":5971,"children":5972},{"style":242},[5973],{"type":47,"value":673},{"type":41,"tag":223,"props":5975,"children":5976},{"style":236},[5977],{"type":47,"value":577},{"type":41,"tag":223,"props":5979,"children":5980},{"style":242},[5981],{"type":47,"value":5903},{"type":41,"tag":223,"props":5983,"children":5984},{"style":236},[5985],{"type":47,"value":577},{"type":41,"tag":223,"props":5987,"children":5988},{"style":242},[5989],{"type":47,"value":623},{"type":41,"tag":223,"props":5991,"children":5992},{"style":236},[5993],{"type":47,"value":530},{"type":41,"tag":223,"props":5995,"children":5996},{"style":242},[5997],{"type":47,"value":5948},{"type":41,"tag":223,"props":5999,"children":6000},{"style":236},[6001],{"type":47,"value":6002},"++",{"type":41,"tag":223,"props":6004,"children":6005},{"style":332},[6006],{"type":47,"value":1955},{"type":41,"tag":223,"props":6008,"children":6009},{"style":236},[6010],{"type":47,"value":325},{"type":41,"tag":223,"props":6012,"children":6013},{"class":225,"line":445},[6014,6019,6024,6028,6032,6036,6040,6045,6050,6054],{"type":41,"tag":223,"props":6015,"children":6016},{"style":230},[6017],{"type":47,"value":6018},"      await",{"type":41,"tag":223,"props":6020,"children":6021},{"style":313},[6022],{"type":47,"value":6023}," processItem",{"type":41,"tag":223,"props":6025,"children":6026},{"style":332},[6027],{"type":47,"value":320},{"type":41,"tag":223,"props":6029,"children":6030},{"style":242},[6031],{"type":47,"value":502},{"type":41,"tag":223,"props":6033,"children":6034},{"style":236},[6035],{"type":47,"value":577},{"type":41,"tag":223,"props":6037,"children":6038},{"style":242},[6039],{"type":47,"value":5903},{"type":41,"tag":223,"props":6041,"children":6042},{"style":332},[6043],{"type":47,"value":6044},"[",{"type":41,"tag":223,"props":6046,"children":6047},{"style":242},[6048],{"type":47,"value":6049},"i",{"type":41,"tag":223,"props":6051,"children":6052},{"style":332},[6053],{"type":47,"value":1640},{"type":41,"tag":223,"props":6055,"children":6056},{"style":236},[6057],{"type":47,"value":275},{"type":41,"tag":223,"props":6059,"children":6060},{"class":225,"line":467},[6061,6066,6070,6074,6078,6082,6086,6090,6094,6099,6103,6108,6112,6116,6121,6125,6129,6133,6137,6141,6145,6150,6155,6159],{"type":41,"tag":223,"props":6062,"children":6063},{"style":242},[6064],{"type":47,"value":6065},"      metadata",{"type":41,"tag":223,"props":6067,"children":6068},{"style":236},[6069],{"type":47,"value":577},{"type":41,"tag":223,"props":6071,"children":6072},{"style":313},[6073],{"type":47,"value":5831},{"type":41,"tag":223,"props":6075,"children":6076},{"style":332},[6077],{"type":47,"value":320},{"type":41,"tag":223,"props":6079,"children":6080},{"style":236},[6081],{"type":47,"value":270},{"type":41,"tag":223,"props":6083,"children":6084},{"style":263},[6085],{"type":47,"value":5844},{"type":41,"tag":223,"props":6087,"children":6088},{"style":236},[6089],{"type":47,"value":270},{"type":41,"tag":223,"props":6091,"children":6092},{"style":236},[6093],{"type":47,"value":1320},{"type":41,"tag":223,"props":6095,"children":6096},{"style":332},[6097],{"type":47,"value":6098}," ((",{"type":41,"tag":223,"props":6100,"children":6101},{"style":242},[6102],{"type":47,"value":6049},{"type":41,"tag":223,"props":6104,"children":6105},{"style":236},[6106],{"type":47,"value":6107}," +",{"type":41,"tag":223,"props":6109,"children":6110},{"style":391},[6111],{"type":47,"value":1389},{"type":41,"tag":223,"props":6113,"children":6114},{"style":332},[6115],{"type":47,"value":1955},{"type":41,"tag":223,"props":6117,"children":6118},{"style":236},[6119],{"type":47,"value":6120},"\u002F",{"type":41,"tag":223,"props":6122,"children":6123},{"style":242},[6124],{"type":47,"value":673},{"type":41,"tag":223,"props":6126,"children":6127},{"style":236},[6128],{"type":47,"value":577},{"type":41,"tag":223,"props":6130,"children":6131},{"style":242},[6132],{"type":47,"value":5903},{"type":41,"tag":223,"props":6134,"children":6135},{"style":236},[6136],{"type":47,"value":577},{"type":41,"tag":223,"props":6138,"children":6139},{"style":242},[6140],{"type":47,"value":623},{"type":41,"tag":223,"props":6142,"children":6143},{"style":332},[6144],{"type":47,"value":1955},{"type":41,"tag":223,"props":6146,"children":6147},{"style":236},[6148],{"type":47,"value":6149},"*",{"type":41,"tag":223,"props":6151,"children":6152},{"style":391},[6153],{"type":47,"value":6154}," 100",{"type":41,"tag":223,"props":6156,"children":6157},{"style":332},[6158],{"type":47,"value":642},{"type":41,"tag":223,"props":6160,"children":6161},{"style":236},[6162],{"type":47,"value":275},{"type":41,"tag":223,"props":6164,"children":6165},{"class":225,"line":476},[6166],{"type":41,"tag":223,"props":6167,"children":6168},{"style":236},[6169],{"type":47,"value":2099},{"type":41,"tag":223,"props":6171,"children":6172},{"class":225,"line":566},[6173],{"type":41,"tag":223,"props":6174,"children":6175},{"emptyLinePlaceholder":282},[6176],{"type":47,"value":285},{"type":41,"tag":223,"props":6178,"children":6179},{"class":225,"line":649},[6180,6184,6188,6192,6196,6200,6204,6208,6212,6216,6221,6225,6229],{"type":41,"tag":223,"props":6181,"children":6182},{"style":242},[6183],{"type":47,"value":5822},{"type":41,"tag":223,"props":6185,"children":6186},{"style":236},[6187],{"type":47,"value":577},{"type":41,"tag":223,"props":6189,"children":6190},{"style":313},[6191],{"type":47,"value":5831},{"type":41,"tag":223,"props":6193,"children":6194},{"style":332},[6195],{"type":47,"value":320},{"type":41,"tag":223,"props":6197,"children":6198},{"style":236},[6199],{"type":47,"value":270},{"type":41,"tag":223,"props":6201,"children":6202},{"style":263},[6203],{"type":47,"value":4897},{"type":41,"tag":223,"props":6205,"children":6206},{"style":236},[6207],{"type":47,"value":270},{"type":41,"tag":223,"props":6209,"children":6210},{"style":236},[6211],{"type":47,"value":1320},{"type":41,"tag":223,"props":6213,"children":6214},{"style":236},[6215],{"type":47,"value":260},{"type":41,"tag":223,"props":6217,"children":6218},{"style":263},[6219],{"type":47,"value":6220},"completed",{"type":41,"tag":223,"props":6222,"children":6223},{"style":236},[6224],{"type":47,"value":270},{"type":41,"tag":223,"props":6226,"children":6227},{"style":332},[6228],{"type":47,"value":642},{"type":41,"tag":223,"props":6230,"children":6231},{"style":236},[6232],{"type":47,"value":275},{"type":41,"tag":223,"props":6234,"children":6235},{"class":225,"line":697},[6236],{"type":41,"tag":223,"props":6237,"children":6238},{"style":236},[6239],{"type":47,"value":473},{"type":41,"tag":223,"props":6241,"children":6242},{"class":225,"line":705},[6243,6247,6251],{"type":41,"tag":223,"props":6244,"children":6245},{"style":236},[6246],{"type":47,"value":628},{"type":41,"tag":223,"props":6248,"children":6249},{"style":242},[6250],{"type":47,"value":642},{"type":41,"tag":223,"props":6252,"children":6253},{"style":236},[6254],{"type":47,"value":275},{"type":41,"tag":56,"props":6256,"children":6258},{"id":6257},"tags",[6259],{"type":47,"value":6260},"Tags",{"type":41,"tag":212,"props":6262,"children":6264},{"className":214,"code":6263,"language":216,"meta":217,"style":217},"import { task, tags } from \"@trigger.dev\u002Fsdk\";\n\nexport const processUser = task({\n  id: \"process-user\",\n  run: async (payload: { userId: string }) => {\n    await tags.add(`user_${payload.userId}`);\n  },\n});\n\n\u002F\u002F Trigger with tags\nawait processUser.trigger(\n  { userId: \"123\" },\n  { tags: [\"priority\", \"user_123\"] }\n);\n",[6265],{"type":41,"tag":112,"props":6266,"children":6267},{"__ignoreMap":217},[6268,6316,6323,6355,6383,6438,6499,6506,6521,6528,6536,6560,6591,6650],{"type":41,"tag":223,"props":6269,"children":6270},{"class":225,"line":226},[6271,6275,6279,6283,6287,6292,6296,6300,6304,6308,6312],{"type":41,"tag":223,"props":6272,"children":6273},{"style":230},[6274],{"type":47,"value":233},{"type":41,"tag":223,"props":6276,"children":6277},{"style":236},[6278],{"type":47,"value":239},{"type":41,"tag":223,"props":6280,"children":6281},{"style":242},[6282],{"type":47,"value":245},{"type":41,"tag":223,"props":6284,"children":6285},{"style":236},[6286],{"type":47,"value":1320},{"type":41,"tag":223,"props":6288,"children":6289},{"style":242},[6290],{"type":47,"value":6291}," tags",{"type":41,"tag":223,"props":6293,"children":6294},{"style":236},[6295],{"type":47,"value":250},{"type":41,"tag":223,"props":6297,"children":6298},{"style":230},[6299],{"type":47,"value":255},{"type":41,"tag":223,"props":6301,"children":6302},{"style":236},[6303],{"type":47,"value":260},{"type":41,"tag":223,"props":6305,"children":6306},{"style":263},[6307],{"type":47,"value":117},{"type":41,"tag":223,"props":6309,"children":6310},{"style":236},[6311],{"type":47,"value":270},{"type":41,"tag":223,"props":6313,"children":6314},{"style":236},[6315],{"type":47,"value":275},{"type":41,"tag":223,"props":6317,"children":6318},{"class":225,"line":278},[6319],{"type":41,"tag":223,"props":6320,"children":6321},{"emptyLinePlaceholder":282},[6322],{"type":47,"value":285},{"type":41,"tag":223,"props":6324,"children":6325},{"class":225,"line":288},[6326,6330,6334,6339,6343,6347,6351],{"type":41,"tag":223,"props":6327,"children":6328},{"style":230},[6329],{"type":47,"value":294},{"type":41,"tag":223,"props":6331,"children":6332},{"style":297},[6333],{"type":47,"value":300},{"type":41,"tag":223,"props":6335,"children":6336},{"style":242},[6337],{"type":47,"value":6338}," processUser ",{"type":41,"tag":223,"props":6340,"children":6341},{"style":236},[6342],{"type":47,"value":310},{"type":41,"tag":223,"props":6344,"children":6345},{"style":313},[6346],{"type":47,"value":245},{"type":41,"tag":223,"props":6348,"children":6349},{"style":242},[6350],{"type":47,"value":320},{"type":41,"tag":223,"props":6352,"children":6353},{"style":236},[6354],{"type":47,"value":325},{"type":41,"tag":223,"props":6356,"children":6357},{"class":225,"line":328},[6358,6362,6366,6370,6375,6379],{"type":41,"tag":223,"props":6359,"children":6360},{"style":332},[6361],{"type":47,"value":335},{"type":41,"tag":223,"props":6363,"children":6364},{"style":236},[6365],{"type":47,"value":340},{"type":41,"tag":223,"props":6367,"children":6368},{"style":236},[6369],{"type":47,"value":260},{"type":41,"tag":223,"props":6371,"children":6372},{"style":263},[6373],{"type":47,"value":6374},"process-user",{"type":41,"tag":223,"props":6376,"children":6377},{"style":236},[6378],{"type":47,"value":270},{"type":41,"tag":223,"props":6380,"children":6381},{"style":236},[6382],{"type":47,"value":358},{"type":41,"tag":223,"props":6384,"children":6385},{"class":225,"line":28},[6386,6390,6394,6398,6402,6406,6410,6414,6418,6422,6426,6430,6434],{"type":41,"tag":223,"props":6387,"children":6388},{"style":313},[6389],{"type":47,"value":482},{"type":41,"tag":223,"props":6391,"children":6392},{"style":236},[6393],{"type":47,"value":340},{"type":41,"tag":223,"props":6395,"children":6396},{"style":297},[6397],{"type":47,"value":491},{"type":41,"tag":223,"props":6399,"children":6400},{"style":236},[6401],{"type":47,"value":496},{"type":41,"tag":223,"props":6403,"children":6404},{"style":499},[6405],{"type":47,"value":502},{"type":41,"tag":223,"props":6407,"children":6408},{"style":236},[6409],{"type":47,"value":340},{"type":41,"tag":223,"props":6411,"children":6412},{"style":236},[6413],{"type":47,"value":239},{"type":41,"tag":223,"props":6415,"children":6416},{"style":332},[6417],{"type":47,"value":515},{"type":41,"tag":223,"props":6419,"children":6420},{"style":236},[6421],{"type":47,"value":340},{"type":41,"tag":223,"props":6423,"children":6424},{"style":522},[6425],{"type":47,"value":525},{"type":41,"tag":223,"props":6427,"children":6428},{"style":236},[6429],{"type":47,"value":3912},{"type":41,"tag":223,"props":6431,"children":6432},{"style":297},[6433],{"type":47,"value":559},{"type":41,"tag":223,"props":6435,"children":6436},{"style":236},[6437],{"type":47,"value":375},{"type":41,"tag":223,"props":6439,"children":6440},{"class":225,"line":378},[6441,6445,6449,6453,6458,6462,6466,6471,6475,6479,6483,6487,6491,6495],{"type":41,"tag":223,"props":6442,"children":6443},{"style":230},[6444],{"type":47,"value":2563},{"type":41,"tag":223,"props":6446,"children":6447},{"style":242},[6448],{"type":47,"value":6291},{"type":41,"tag":223,"props":6450,"children":6451},{"style":236},[6452],{"type":47,"value":577},{"type":41,"tag":223,"props":6454,"children":6455},{"style":313},[6456],{"type":47,"value":6457},"add",{"type":41,"tag":223,"props":6459,"children":6460},{"style":332},[6461],{"type":47,"value":320},{"type":41,"tag":223,"props":6463,"children":6464},{"style":236},[6465],{"type":47,"value":591},{"type":41,"tag":223,"props":6467,"children":6468},{"style":263},[6469],{"type":47,"value":6470},"user_",{"type":41,"tag":223,"props":6472,"children":6473},{"style":236},[6474],{"type":47,"value":601},{"type":41,"tag":223,"props":6476,"children":6477},{"style":242},[6478],{"type":47,"value":502},{"type":41,"tag":223,"props":6480,"children":6481},{"style":236},[6482],{"type":47,"value":577},{"type":41,"tag":223,"props":6484,"children":6485},{"style":242},[6486],{"type":47,"value":3465},{"type":41,"tag":223,"props":6488,"children":6489},{"style":236},[6490],{"type":47,"value":1103},{"type":41,"tag":223,"props":6492,"children":6493},{"style":332},[6494],{"type":47,"value":642},{"type":41,"tag":223,"props":6496,"children":6497},{"style":236},[6498],{"type":47,"value":275},{"type":41,"tag":223,"props":6500,"children":6501},{"class":225,"line":401},[6502],{"type":41,"tag":223,"props":6503,"children":6504},{"style":236},[6505],{"type":47,"value":473},{"type":41,"tag":223,"props":6507,"children":6508},{"class":225,"line":423},[6509,6513,6517],{"type":41,"tag":223,"props":6510,"children":6511},{"style":236},[6512],{"type":47,"value":628},{"type":41,"tag":223,"props":6514,"children":6515},{"style":242},[6516],{"type":47,"value":642},{"type":41,"tag":223,"props":6518,"children":6519},{"style":236},[6520],{"type":47,"value":275},{"type":41,"tag":223,"props":6522,"children":6523},{"class":225,"line":445},[6524],{"type":41,"tag":223,"props":6525,"children":6526},{"emptyLinePlaceholder":282},[6527],{"type":47,"value":285},{"type":41,"tag":223,"props":6529,"children":6530},{"class":225,"line":467},[6531],{"type":41,"tag":223,"props":6532,"children":6533},{"style":1048},[6534],{"type":47,"value":6535},"\u002F\u002F Trigger with tags\n",{"type":41,"tag":223,"props":6537,"children":6538},{"class":225,"line":476},[6539,6543,6548,6552,6556],{"type":41,"tag":223,"props":6540,"children":6541},{"style":230},[6542],{"type":47,"value":3394},{"type":41,"tag":223,"props":6544,"children":6545},{"style":242},[6546],{"type":47,"value":6547}," processUser",{"type":41,"tag":223,"props":6549,"children":6550},{"style":236},[6551],{"type":47,"value":577},{"type":41,"tag":223,"props":6553,"children":6554},{"style":313},[6555],{"type":47,"value":1285},{"type":41,"tag":223,"props":6557,"children":6558},{"style":242},[6559],{"type":47,"value":3561},{"type":41,"tag":223,"props":6561,"children":6562},{"class":225,"line":566},[6563,6567,6571,6575,6579,6583,6587],{"type":41,"tag":223,"props":6564,"children":6565},{"style":236},[6566],{"type":47,"value":1510},{"type":41,"tag":223,"props":6568,"children":6569},{"style":332},[6570],{"type":47,"value":515},{"type":41,"tag":223,"props":6572,"children":6573},{"style":236},[6574],{"type":47,"value":340},{"type":41,"tag":223,"props":6576,"children":6577},{"style":236},[6578],{"type":47,"value":260},{"type":41,"tag":223,"props":6580,"children":6581},{"style":263},[6582],{"type":47,"value":1345},{"type":41,"tag":223,"props":6584,"children":6585},{"style":236},[6586],{"type":47,"value":270},{"type":41,"tag":223,"props":6588,"children":6589},{"style":236},[6590],{"type":47,"value":1568},{"type":41,"tag":223,"props":6592,"children":6593},{"class":225,"line":649},[6594,6598,6602,6606,6610,6614,6619,6623,6627,6631,6636,6640,6645],{"type":41,"tag":223,"props":6595,"children":6596},{"style":236},[6597],{"type":47,"value":1510},{"type":41,"tag":223,"props":6599,"children":6600},{"style":332},[6601],{"type":47,"value":6291},{"type":41,"tag":223,"props":6603,"children":6604},{"style":236},[6605],{"type":47,"value":340},{"type":41,"tag":223,"props":6607,"children":6608},{"style":242},[6609],{"type":47,"value":1370},{"type":41,"tag":223,"props":6611,"children":6612},{"style":236},[6613],{"type":47,"value":270},{"type":41,"tag":223,"props":6615,"children":6616},{"style":263},[6617],{"type":47,"value":6618},"priority",{"type":41,"tag":223,"props":6620,"children":6621},{"style":236},[6622],{"type":47,"value":270},{"type":41,"tag":223,"props":6624,"children":6625},{"style":236},[6626],{"type":47,"value":1320},{"type":41,"tag":223,"props":6628,"children":6629},{"style":236},[6630],{"type":47,"value":260},{"type":41,"tag":223,"props":6632,"children":6633},{"style":263},[6634],{"type":47,"value":6635},"user_123",{"type":41,"tag":223,"props":6637,"children":6638},{"style":236},[6639],{"type":47,"value":270},{"type":41,"tag":223,"props":6641,"children":6642},{"style":242},[6643],{"type":47,"value":6644},"] ",{"type":41,"tag":223,"props":6646,"children":6647},{"style":236},[6648],{"type":47,"value":6649},"}\n",{"type":41,"tag":223,"props":6651,"children":6652},{"class":225,"line":697},[6653,6657],{"type":41,"tag":223,"props":6654,"children":6655},{"style":242},[6656],{"type":47,"value":642},{"type":41,"tag":223,"props":6658,"children":6659},{"style":236},[6660],{"type":47,"value":275},{"type":41,"tag":56,"props":6662,"children":6664},{"id":6663},"machine-presets",[6665],{"type":47,"value":6666},"Machine Presets",{"type":41,"tag":212,"props":6668,"children":6670},{"className":214,"code":6669,"language":216,"meta":217,"style":217},"export const heavyTask = task({\n  id: \"heavy-computation\",\n  machine: { preset: \"large-2x\" }, \u002F\u002F 8 vCPU, 16 GB RAM\n  maxDuration: 1800, \u002F\u002F 30 minutes\n  run: async (payload) => {},\n});\n",[6671],{"type":41,"tag":112,"props":6672,"children":6673},{"__ignoreMap":217},[6674,6706,6734,6782,6808,6843],{"type":41,"tag":223,"props":6675,"children":6676},{"class":225,"line":226},[6677,6681,6685,6690,6694,6698,6702],{"type":41,"tag":223,"props":6678,"children":6679},{"style":230},[6680],{"type":47,"value":294},{"type":41,"tag":223,"props":6682,"children":6683},{"style":297},[6684],{"type":47,"value":300},{"type":41,"tag":223,"props":6686,"children":6687},{"style":242},[6688],{"type":47,"value":6689}," heavyTask ",{"type":41,"tag":223,"props":6691,"children":6692},{"style":236},[6693],{"type":47,"value":310},{"type":41,"tag":223,"props":6695,"children":6696},{"style":313},[6697],{"type":47,"value":245},{"type":41,"tag":223,"props":6699,"children":6700},{"style":242},[6701],{"type":47,"value":320},{"type":41,"tag":223,"props":6703,"children":6704},{"style":236},[6705],{"type":47,"value":325},{"type":41,"tag":223,"props":6707,"children":6708},{"class":225,"line":278},[6709,6713,6717,6721,6726,6730],{"type":41,"tag":223,"props":6710,"children":6711},{"style":332},[6712],{"type":47,"value":335},{"type":41,"tag":223,"props":6714,"children":6715},{"style":236},[6716],{"type":47,"value":340},{"type":41,"tag":223,"props":6718,"children":6719},{"style":236},[6720],{"type":47,"value":260},{"type":41,"tag":223,"props":6722,"children":6723},{"style":263},[6724],{"type":47,"value":6725},"heavy-computation",{"type":41,"tag":223,"props":6727,"children":6728},{"style":236},[6729],{"type":47,"value":270},{"type":41,"tag":223,"props":6731,"children":6732},{"style":236},[6733],{"type":47,"value":358},{"type":41,"tag":223,"props":6735,"children":6736},{"class":225,"line":288},[6737,6742,6746,6750,6755,6759,6763,6768,6772,6777],{"type":41,"tag":223,"props":6738,"children":6739},{"style":332},[6740],{"type":47,"value":6741},"  machine",{"type":41,"tag":223,"props":6743,"children":6744},{"style":236},[6745],{"type":47,"value":340},{"type":41,"tag":223,"props":6747,"children":6748},{"style":236},[6749],{"type":47,"value":239},{"type":41,"tag":223,"props":6751,"children":6752},{"style":332},[6753],{"type":47,"value":6754}," preset",{"type":41,"tag":223,"props":6756,"children":6757},{"style":236},[6758],{"type":47,"value":340},{"type":41,"tag":223,"props":6760,"children":6761},{"style":236},[6762],{"type":47,"value":260},{"type":41,"tag":223,"props":6764,"children":6765},{"style":263},[6766],{"type":47,"value":6767},"large-2x",{"type":41,"tag":223,"props":6769,"children":6770},{"style":236},[6771],{"type":47,"value":270},{"type":41,"tag":223,"props":6773,"children":6774},{"style":236},[6775],{"type":47,"value":6776}," },",{"type":41,"tag":223,"props":6778,"children":6779},{"style":1048},[6780],{"type":47,"value":6781}," \u002F\u002F 8 vCPU, 16 GB RAM\n",{"type":41,"tag":223,"props":6783,"children":6784},{"class":225,"line":328},[6785,6790,6794,6799,6803],{"type":41,"tag":223,"props":6786,"children":6787},{"style":332},[6788],{"type":47,"value":6789},"  maxDuration",{"type":41,"tag":223,"props":6791,"children":6792},{"style":236},[6793],{"type":47,"value":340},{"type":41,"tag":223,"props":6795,"children":6796},{"style":391},[6797],{"type":47,"value":6798}," 1800",{"type":41,"tag":223,"props":6800,"children":6801},{"style":236},[6802],{"type":47,"value":1320},{"type":41,"tag":223,"props":6804,"children":6805},{"style":1048},[6806],{"type":47,"value":6807}," \u002F\u002F 30 minutes\n",{"type":41,"tag":223,"props":6809,"children":6810},{"class":225,"line":28},[6811,6815,6819,6823,6827,6831,6835,6839],{"type":41,"tag":223,"props":6812,"children":6813},{"style":313},[6814],{"type":47,"value":482},{"type":41,"tag":223,"props":6816,"children":6817},{"style":236},[6818],{"type":47,"value":340},{"type":41,"tag":223,"props":6820,"children":6821},{"style":297},[6822],{"type":47,"value":491},{"type":41,"tag":223,"props":6824,"children":6825},{"style":236},[6826],{"type":47,"value":496},{"type":41,"tag":223,"props":6828,"children":6829},{"style":499},[6830],{"type":47,"value":502},{"type":41,"tag":223,"props":6832,"children":6833},{"style":236},[6834],{"type":47,"value":642},{"type":41,"tag":223,"props":6836,"children":6837},{"style":297},[6838],{"type":47,"value":559},{"type":41,"tag":223,"props":6840,"children":6841},{"style":236},[6842],{"type":47,"value":3354},{"type":41,"tag":223,"props":6844,"children":6845},{"class":225,"line":378},[6846,6850,6854],{"type":41,"tag":223,"props":6847,"children":6848},{"style":236},[6849],{"type":47,"value":628},{"type":41,"tag":223,"props":6851,"children":6852},{"style":242},[6853],{"type":47,"value":642},{"type":41,"tag":223,"props":6855,"children":6856},{"style":236},[6857],{"type":47,"value":275},{"type":41,"tag":6859,"props":6860,"children":6861},"table",{},[6862,6886],{"type":41,"tag":6863,"props":6864,"children":6865},"thead",{},[6866],{"type":41,"tag":6867,"props":6868,"children":6869},"tr",{},[6870,6876,6881],{"type":41,"tag":6871,"props":6872,"children":6873},"th",{},[6874],{"type":47,"value":6875},"Preset",{"type":41,"tag":6871,"props":6877,"children":6878},{},[6879],{"type":47,"value":6880},"vCPU",{"type":41,"tag":6871,"props":6882,"children":6883},{},[6884],{"type":47,"value":6885},"RAM",{"type":41,"tag":6887,"props":6888,"children":6889},"tbody",{},[6890,6909,6927,6945,6962,6980,6998],{"type":41,"tag":6867,"props":6891,"children":6892},{},[6893,6899,6904],{"type":41,"tag":6894,"props":6895,"children":6896},"td",{},[6897],{"type":47,"value":6898},"micro",{"type":41,"tag":6894,"props":6900,"children":6901},{},[6902],{"type":47,"value":6903},"0.25",{"type":41,"tag":6894,"props":6905,"children":6906},{},[6907],{"type":47,"value":6908},"0.25 GB",{"type":41,"tag":6867,"props":6910,"children":6911},{},[6912,6917,6922],{"type":41,"tag":6894,"props":6913,"children":6914},{},[6915],{"type":47,"value":6916},"small-1x",{"type":41,"tag":6894,"props":6918,"children":6919},{},[6920],{"type":47,"value":6921},"0.5",{"type":41,"tag":6894,"props":6923,"children":6924},{},[6925],{"type":47,"value":6926},"0.5 GB (default)",{"type":41,"tag":6867,"props":6928,"children":6929},{},[6930,6935,6940],{"type":41,"tag":6894,"props":6931,"children":6932},{},[6933],{"type":47,"value":6934},"small-2x",{"type":41,"tag":6894,"props":6936,"children":6937},{},[6938],{"type":47,"value":6939},"1",{"type":41,"tag":6894,"props":6941,"children":6942},{},[6943],{"type":47,"value":6944},"1 GB",{"type":41,"tag":6867,"props":6946,"children":6947},{},[6948,6953,6957],{"type":41,"tag":6894,"props":6949,"children":6950},{},[6951],{"type":47,"value":6952},"medium-1x",{"type":41,"tag":6894,"props":6954,"children":6955},{},[6956],{"type":47,"value":6939},{"type":41,"tag":6894,"props":6958,"children":6959},{},[6960],{"type":47,"value":6961},"2 GB",{"type":41,"tag":6867,"props":6963,"children":6964},{},[6965,6970,6975],{"type":41,"tag":6894,"props":6966,"children":6967},{},[6968],{"type":47,"value":6969},"medium-2x",{"type":41,"tag":6894,"props":6971,"children":6972},{},[6973],{"type":47,"value":6974},"2",{"type":41,"tag":6894,"props":6976,"children":6977},{},[6978],{"type":47,"value":6979},"4 GB",{"type":41,"tag":6867,"props":6981,"children":6982},{},[6983,6988,6993],{"type":41,"tag":6894,"props":6984,"children":6985},{},[6986],{"type":47,"value":6987},"large-1x",{"type":41,"tag":6894,"props":6989,"children":6990},{},[6991],{"type":47,"value":6992},"4",{"type":41,"tag":6894,"props":6994,"children":6995},{},[6996],{"type":47,"value":6997},"8 GB",{"type":41,"tag":6867,"props":6999,"children":7000},{},[7001,7005,7010],{"type":41,"tag":6894,"props":7002,"children":7003},{},[7004],{"type":47,"value":6767},{"type":41,"tag":6894,"props":7006,"children":7007},{},[7008],{"type":47,"value":7009},"8",{"type":41,"tag":6894,"props":7011,"children":7012},{},[7013],{"type":47,"value":7014},"16 GB",{"type":41,"tag":56,"props":7016,"children":7018},{"id":7017},"best-practices",[7019],{"type":47,"value":7020},"Best Practices",{"type":41,"tag":99,"props":7022,"children":7023},{},[7024,7034,7044,7054,7064,7074],{"type":41,"tag":67,"props":7025,"children":7026},{},[7027,7032],{"type":41,"tag":106,"props":7028,"children":7029},{},[7030],{"type":47,"value":7031},"Make tasks idempotent",{"type":47,"value":7033}," — safe to retry without side effects",{"type":41,"tag":67,"props":7035,"children":7036},{},[7037,7042],{"type":41,"tag":106,"props":7038,"children":7039},{},[7040],{"type":47,"value":7041},"Use queues",{"type":47,"value":7043}," to prevent overwhelming external services",{"type":41,"tag":67,"props":7045,"children":7046},{},[7047,7052],{"type":41,"tag":106,"props":7048,"children":7049},{},[7050],{"type":47,"value":7051},"Configure appropriate retries",{"type":47,"value":7053}," with exponential backoff",{"type":41,"tag":67,"props":7055,"children":7056},{},[7057,7062],{"type":41,"tag":106,"props":7058,"children":7059},{},[7060],{"type":47,"value":7061},"Track progress with metadata",{"type":47,"value":7063}," for long-running tasks",{"type":41,"tag":67,"props":7065,"children":7066},{},[7067,7072],{"type":41,"tag":106,"props":7068,"children":7069},{},[7070],{"type":47,"value":7071},"Use debouncing",{"type":47,"value":7073}," for user activity and webhook bursts",{"type":41,"tag":67,"props":7075,"children":7076},{},[7077,7082],{"type":41,"tag":106,"props":7078,"children":7079},{},[7080],{"type":47,"value":7081},"Match machine size",{"type":47,"value":7083}," to computational requirements",{"type":41,"tag":50,"props":7085,"children":7086},{},[7087,7089,7095],{"type":47,"value":7088},"See ",{"type":41,"tag":112,"props":7090,"children":7092},{"className":7091},[],[7093],{"type":47,"value":7094},"references\u002F",{"type":47,"value":7096}," for detailed documentation on each feature.",{"type":41,"tag":7098,"props":7099,"children":7100},"style",{},[7101],{"type":47,"value":7102},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":7104,"total":378},[7105,7118,7132,7149,7166,7178],{"slug":7106,"name":7106,"fn":7107,"description":7108,"org":7109,"tags":7110,"stars":24,"repoUrl":25,"updatedAt":7117},"trigger-agents","orchestrate AI agents with Trigger.dev","AI agent patterns with Trigger.dev - orchestration, parallelization, routing, evaluator-optimizer, and human-in-the-loop. Use when building LLM-powered tasks that need parallel workers, approval gates, tool calling, or multi-step agent workflows.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7111,7112,7115,7116],{"name":19,"slug":20,"type":16},{"name":7113,"slug":7114,"type":16},"Multi-Agent","multi-agent",{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},"2026-04-06T18:54:46.023553",{"slug":7119,"name":7119,"fn":7120,"description":7121,"org":7122,"tags":7123,"stars":24,"repoUrl":25,"updatedAt":7131},"trigger-config","configure Trigger.dev project settings","Configure Trigger.dev projects with trigger.config.ts. Use when setting up build extensions for Prisma, Playwright, FFmpeg, Python, or customizing deployment settings.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7124,7127,7130],{"name":7125,"slug":7126,"type":16},"Configuration","configuration",{"name":7128,"slug":7129,"type":16},"Deployment","deployment",{"name":9,"slug":8,"type":16},"2026-04-06T18:54:44.764258",{"slug":7133,"name":7133,"fn":7134,"description":7135,"org":7136,"tags":7137,"stars":24,"repoUrl":25,"updatedAt":7148},"trigger-cost-savings","optimize Trigger.dev task costs","Analyze Trigger.dev tasks, schedules, and runs for cost optimization opportunities. Use when asked to reduce spend, optimize costs, audit usage, right-size machines, or review task efficiency. Requires Trigger.dev MCP tools for run analysis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7138,7141,7144,7147],{"name":7139,"slug":7140,"type":16},"Analytics","analytics",{"name":7142,"slug":7143,"type":16},"Cost Optimization","cost-optimization",{"name":7145,"slug":7146,"type":16},"Operations","operations",{"name":9,"slug":8,"type":16},"2026-04-06T18:54:48.555552",{"slug":7150,"name":7150,"fn":7151,"description":7152,"org":7153,"tags":7154,"stars":24,"repoUrl":25,"updatedAt":7165},"trigger-realtime","monitor Trigger.dev tasks in real-time","Subscribe to Trigger.dev task runs in real-time from frontend and backend. Use when building progress indicators, live dashboards, streaming AI\u002FLLM responses, or React components that display task status.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7155,7158,7161,7164],{"name":7156,"slug":7157,"type":16},"Frontend","frontend",{"name":7159,"slug":7160,"type":16},"Observability","observability",{"name":7162,"slug":7163,"type":16},"Real-time","real-time",{"name":9,"slug":8,"type":16},"2026-04-06T18:54:47.293822",{"slug":7167,"name":7167,"fn":7168,"description":7169,"org":7170,"tags":7171,"stars":24,"repoUrl":25,"updatedAt":7177},"trigger-setup","set up Trigger.dev in projects","Set up Trigger.dev in your project. Use when adding Trigger.dev for the first time, creating trigger.config.ts, or initializing the trigger directory.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7172,7173,7176],{"name":7125,"slug":7126,"type":16},{"name":7174,"slug":7175,"type":16},"Local Development","local-development",{"name":9,"slug":8,"type":16},"2026-04-06T18:54:42.280816",{"slug":4,"name":4,"fn":5,"description":6,"org":7179,"tags":7180,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7181,7182,7183,7184],{"name":19,"slug":20,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},{"items":7186,"total":3388},[7187,7202,7213,7223,7236,7243,7249,7256,7263,7269,7276,7290],{"slug":7188,"name":7188,"fn":7189,"description":7190,"org":7191,"tags":7192,"stars":7199,"repoUrl":7200,"updatedAt":7201},"trigger-authoring-chat-agent","author durable AI chat agents with Trigger.dev","Author and run a durable AI chat agent with chat.agent from @trigger.dev\u002Fsdk\u002Fai: the per-turn run loop, why you MUST spread ...chat.toStreamTextOptions() first, returning a StreamTextResult vs calling chat.pipe(), the two server actions (chat.createStartSessionAction + auth.createPublicToken), and wiring useChat to useTriggerChatTransport. Load this when building, modifying, or debugging a chat backend (the agent task or its lifecycle hooks) or its React transport, when declaring typed tools or custom data parts, or when migrating a plain AI SDK streamText route to chat.agent.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7193,7194,7197,7198],{"name":19,"slug":20,"type":16},{"name":7195,"slug":7196,"type":16},"SDK","sdk",{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},14401,"https:\u002F\u002Fgithub.com\u002Ftriggerdotdev\u002Ftrigger.dev","2026-07-02T17:12:52.307135",{"slug":7203,"name":7203,"fn":7204,"description":7205,"org":7206,"tags":7207,"stars":7199,"repoUrl":7200,"updatedAt":7212},"trigger-authoring-tasks","author backend Trigger.dev tasks","Covers writing backend Trigger.dev tasks with @trigger.dev\u002Fsdk: defining task() and schemaTask(), the run function and its ctx, retries, waits, queues and concurrency, idempotency keys, run metadata, logging, triggering other tasks (and the Result shape), scheduled\u002Fcron tasks, and the essentials of trigger.config.ts. Load this whenever you are authoring or editing code inside a \u002Ftrigger directory, defining a task, or writing backend code that triggers tasks. Realtime\u002FReact hooks and AI chat are covered by separate skills.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7208,7209,7210,7211],{"name":14,"slug":15,"type":16},{"name":7195,"slug":7196,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},"2026-07-02T17:12:48.396964",{"slug":7214,"name":7214,"fn":7215,"description":7216,"org":7217,"tags":7218,"stars":7199,"repoUrl":7200,"updatedAt":7222},"trigger-chat-agent-advanced","manage Trigger.dev chat sessions and transports","Advanced and operational chat.agent capabilities for Trigger.dev, loaded on demand. Load this when working on the raw Sessions primitive (sessions \u002F SessionHandle), a custom chat transport or the realtime wire protocol, durable sub-agents (AgentChat, chat.stream.writer), human-in-the-loop, steering, actions, background injection (chat.defer \u002F chat.inject), fast starts (preload, Head Start via @trigger.dev\u002Fsdk\u002Fchat-server), context resilience (compaction, recovery boot, OOM, large payloads), chat.local run-scoped state, offline testing with mockChatAgent, or prerelease\u002Fversion upgrades. For the everyday chat.agent({...}) definition and the useTriggerChatTransport happy path, use the trigger-authoring-chat-agent skill instead.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7219,7220,7221],{"name":19,"slug":20,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},"2026-07-02T17:12:51.03018",{"slug":7224,"name":7224,"fn":7225,"description":7226,"org":7227,"tags":7228,"stars":7199,"repoUrl":7200,"updatedAt":7235},"trigger-realtime-and-frontend","subscribe to Trigger.dev runs in realtime","Trigger.dev client\u002Ffrontend surface: subscribe to runs in realtime (runs.subscribeToRun and the @trigger.dev\u002Freact-hooks hook useRealtimeRun), consume metadata and AI\u002Ftext streams in React (useRealtimeStream), trigger tasks from the browser (useTaskTrigger, useRealtimeTaskTrigger), and mint scoped frontend credentials with auth.createPublicToken \u002F auth.createTriggerPublicToken. Load when wiring a frontend (React\u002FNext.js\u002FRemix) or backend-for-frontend to show live run progress, status badges, token streams, trigger buttons, or wait-token approval UIs. NOT for writing the backend task itself (streams.define \u002F metadata.set is trigger-authoring-tasks territory); this is the consumer side.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7229,7230,7233,7234],{"name":7156,"slug":7157,"type":16},{"name":7231,"slug":7232,"type":16},"React","react",{"name":7162,"slug":7163,"type":16},{"name":9,"slug":8,"type":16},"2026-07-02T17:12:49.717706",{"slug":7106,"name":7106,"fn":7107,"description":7108,"org":7237,"tags":7238,"stars":24,"repoUrl":25,"updatedAt":7117},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7239,7240,7241,7242],{"name":19,"slug":20,"type":16},{"name":7113,"slug":7114,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},{"slug":7119,"name":7119,"fn":7120,"description":7121,"org":7244,"tags":7245,"stars":24,"repoUrl":25,"updatedAt":7131},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7246,7247,7248],{"name":7125,"slug":7126,"type":16},{"name":7128,"slug":7129,"type":16},{"name":9,"slug":8,"type":16},{"slug":7133,"name":7133,"fn":7134,"description":7135,"org":7250,"tags":7251,"stars":24,"repoUrl":25,"updatedAt":7148},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7252,7253,7254,7255],{"name":7139,"slug":7140,"type":16},{"name":7142,"slug":7143,"type":16},{"name":7145,"slug":7146,"type":16},{"name":9,"slug":8,"type":16},{"slug":7150,"name":7150,"fn":7151,"description":7152,"org":7257,"tags":7258,"stars":24,"repoUrl":25,"updatedAt":7165},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7259,7260,7261,7262],{"name":7156,"slug":7157,"type":16},{"name":7159,"slug":7160,"type":16},{"name":7162,"slug":7163,"type":16},{"name":9,"slug":8,"type":16},{"slug":7167,"name":7167,"fn":7168,"description":7169,"org":7264,"tags":7265,"stars":24,"repoUrl":25,"updatedAt":7177},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7266,7267,7268],{"name":7125,"slug":7126,"type":16},{"name":7174,"slug":7175,"type":16},{"name":9,"slug":8,"type":16},{"slug":4,"name":4,"fn":5,"description":6,"org":7270,"tags":7271,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7272,7273,7274,7275],{"name":19,"slug":20,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},{"slug":7277,"name":7277,"fn":7278,"description":7279,"org":7280,"tags":7281,"stars":288,"repoUrl":7288,"updatedAt":7289},"staff-engineering-skills-backpressure","implement backpressure in streaming pipelines","Prevent unbounded resource growth when producers outpace consumers. Use when writing producer-consumer code, queue processing, batch operations, fan-out patterns, streaming pipelines, or any code where work is generated faster than it can be processed. Activates on patterns like Promise.all on dynamic-sized arrays, unbounded in-memory queues, producer loops without depth checks, fire-and-forget async calls in loops, or any buffer between a producer and consumer without a size limit.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7282,7285],{"name":7283,"slug":7284,"type":16},"Architecture","architecture",{"name":7286,"slug":7287,"type":16},"Performance","performance","https:\u002F\u002Fgithub.com\u002Ftriggerdotdev\u002Fstaff-engineering-skills","2026-06-17T08:40:42.723559",{"slug":7291,"name":7291,"fn":7292,"description":7293,"org":7294,"tags":7295,"stars":288,"repoUrl":7288,"updatedAt":7304},"staff-engineering-skills-cache-invalidation","implement cache invalidation strategies","Prevent stale data bugs caused by missing or incomplete cache invalidation. Use when adding caching layers (Redis, in-memory Map, CDN, HTTP cache headers), optimizing read performance, or reviewing code that caches query results, API responses, or computed values. Activates on patterns like cache.set without cache.delete on write paths, unbounded Map\u002Fobject caches, TTL-only invalidation on security-sensitive data, Cache-Control headers on mutable content, or any caching where the write path doesn't invalidate the read cache.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7296,7297,7300,7303],{"name":7283,"slug":7284,"type":16},{"name":7298,"slug":7299,"type":16},"Caching","caching",{"name":7301,"slug":7302,"type":16},"Engineering","engineering",{"name":7286,"slug":7287,"type":16},"2026-06-17T08:40:45.194583"]