[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-inngest-inngest-flow-control":3,"mdc--5v7m2r-key":41,"related-repo-inngest-inngest-flow-control":4688,"related-org-inngest-inngest-flow-control":4791},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":36,"sourceUrl":39,"mdContent":40},"inngest-flow-control","manage API rate limits and load","Use when handling external API rate limits (e.g., OpenAI 429s, HubSpot or Stripe rate limits), preventing duplicate work from rapid event bursts (debouncing user actions), spreading load over time, ensuring per-tenant fairness, processing events in batches, limiting concurrent runs of the same operation, or assigning priority to important runs. Covers Inngest flow control: concurrency limits with keys, throttling, rate limiting, debounce, priority, singleton, and event batching.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"inngest","Inngest","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Finngest.png",[12,16,19,20],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":17,"slug":18,"type":15},"Automation","automation",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"API Development","api-development",26,"https:\u002F\u002Fgithub.com\u002Finngest\u002Finngest-skills","2026-07-12T07:36:52.987451",null,5,[29,30,31,32,33,34,35],"agent-skill-repository","agent-skills","agentic-skills","ai-agents","claude-code-skills","cursor-skills","openclaw-skills",{"repoUrl":24,"stars":23,"forks":27,"topics":37,"description":38},[29,30,31,32,33,34,35],"Agent Skills for building with Inngest","https:\u002F\u002Fgithub.com\u002Finngest\u002Finngest-skills\u002Ftree\u002FHEAD\u002Fskills\u002Finngest-flow-control","---\nname: inngest-flow-control\ndescription: \"Use when handling external API rate limits (e.g., OpenAI 429s, HubSpot or Stripe rate limits), preventing duplicate work from rapid event bursts (debouncing user actions), spreading load over time, ensuring per-tenant fairness, processing events in batches, limiting concurrent runs of the same operation, or assigning priority to important runs. Covers Inngest flow control: concurrency limits with keys, throttling, rate limiting, debounce, priority, singleton, and event batching.\"\n---\n\n# Inngest Flow Control\n\nMaster Inngest flow control mechanisms to manage resources, prevent overloading systems, and ensure application reliability. This skill covers all flow control options with prescriptive guidance on when and how to use each.\n\n> **These skills are focused on TypeScript.** For Python or Go, refer to the [Inngest documentation](https:\u002F\u002Fwww.inngest.com\u002Fllms.txt) for language-specific guidance. Core concepts apply across all languages.\n\n## Quick Decision Guide\n\n- **\"Limit how many run at once\"** → Concurrency\n- **\"Spread runs over time\"** → Throttling\n- **\"Block after N runs in a period\"** → Rate Limiting\n- **\"Wait for activity to stop, then run once\"** → Debounce\n- **\"Only one run at a time for this key\"** → Singleton\n- **\"Process events in groups\"** → Batching\n- **\"Some runs are more important\"** → Priority\n\n## Concurrency\n\n**When to use:** Limit the number of executing steps (not function runs) to manage computing resources and prevent system overwhelm.\n\n**Key insight:** Concurrency limits active code execution, not function runs. A function waiting on `step.sleep()` or `step.waitForEvent()` doesn't count against the limit.\n\n### Basic Concurrency\n\n```typescript\ninngest.createFunction(\n  {\n    id: \"process-images\",\n    concurrency: 5,\n    triggers: [{ event: \"media\u002Fimage.uploaded\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Only 5 steps can execute simultaneously\n    await step.run(\"resize\", () => resizeImage(event.data.imageUrl));\n  }\n);\n```\n\n### Concurrency with Keys (Multi-tenant)\n\nUse `key` parameter to apply limit per unique value of the key.\n\n```typescript\ninngest.createFunction(\n  {\n    id: \"user-sync\",\n    concurrency: [\n      {\n        key: \"event.data.user_id\",\n        limit: 1\n      }\n    ],\n    triggers: [{ event: \"user\u002Fprofile.updated\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Only 1 step per user can execute at once\n    \u002F\u002F Prevents race conditions in user-specific operations\n  }\n);\n```\n\n### Account-level Shared Limits\n\n```typescript\ninngest.createFunction(\n  {\n    id: \"ai-summary\",\n    concurrency: [\n      {\n        scope: \"account\",\n        key: `\"openai\"`,\n        limit: 60\n      }\n    ],\n    triggers: [{ event: \"ai\u002Fsummary.requested\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Share 60 concurrent OpenAI calls across all functions\n  }\n);\n```\n\n**When to use each:**\n\n- Basic: Protect databases or limit general capacity\n- Keyed: Multi-tenant fairness, prevent \"noisy neighbor\" issues\n- Account-level: Share quotas across multiple functions (API limits)\n\n## Throttling\n\n**When to use:** Control the rate of function starts over time to work around API rate limits or smooth traffic spikes.\n\n**Key difference from concurrency:** Throttling limits function run starts; concurrency limits step execution.\n\n```typescript\ninngest.createFunction(\n  {\n    id: \"sync-crm-data\",\n    throttle: {\n      limit: 10, \u002F\u002F 10 function starts\n      period: \"60s\", \u002F\u002F per minute\n      burst: 5, \u002F\u002F plus 5 immediate bursts\n      key: \"event.data.customer_id\" \u002F\u002F per customer\n    },\n    triggers: [{ event: \"crm\u002Fcontact.updated\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Respects CRM API rate limits: 10 calls\u002Fmin per customer\n    await step.run(\"sync\", () => crmApi.updateContact(event.data));\n  }\n);\n```\n\n**Configuration:**\n\n- `limit`: Functions that can start per period\n- `period`: Time window (1s to 7d)\n- `burst`: Extra immediate starts allowed\n- `key`: Apply limits per unique key value\n\n## Rate Limiting\n\n**When to use:** Hard limit to prevent abuse or skip excessive duplicate events.\n\n**Key difference from throttling:** Rate limiting discards events; throttling delays them.\n\n```typescript\ninngest.createFunction(\n  {\n    id: \"webhook-processor\",\n    rateLimit: {\n      limit: 1,\n      period: \"4h\",\n      key: \"event.data.webhook_id\"\n    },\n    triggers: [{ event: \"webhook\u002Fdata.received\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Process each webhook only once per 4 hours\n    \u002F\u002F Prevents duplicate webhook spam\n  }\n);\n```\n\n**Use cases:**\n\n- Prevent webhook duplicates\n- Limit expensive operations per user\n- Protection against abuse\n\n## Debounce\n\n**When to use:** Wait for a series of events to stop arriving before processing the latest one.\n\n```typescript\ninngest.createFunction(\n  {\n    id: \"save-document\",\n    debounce: {\n      period: \"5m\", \u002F\u002F Wait 5min after last edit\n      key: \"event.data.document_id\",\n      timeout: \"30m\" \u002F\u002F Force save after 30min max\n    },\n    triggers: [{ event: \"document\u002Fcontent.changed\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Saves document only after user stops editing\n    \u002F\u002F Uses the LAST event received\n    await step.run(\"save\", () => saveDocument(event.data));\n  }\n);\n```\n\n**Perfect for:**\n\n- User input that changes rapidly (search, document editing)\n- Noisy webhook events\n- Ensuring latest data is processed\n\n## Priority\n\n**When to use:** Execute some function runs ahead of others based on dynamic data.\n\n```typescript\ninngest.createFunction(\n  {\n    id: \"process-order\",\n    priority: {\n      \u002F\u002F VIP users get priority up to 120 seconds ahead\n      run: \"event.data.user_tier == 'vip' ? 120 : 0\"\n    },\n    triggers: [{ event: \"order\u002Fplaced\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F VIP orders jump ahead in the queue\n  }\n);\n```\n\n**Advanced example:**\n\n```typescript\ninngest.createFunction(\n  {\n    id: \"support-ticket\",\n    priority: {\n      run: `\n        event.data.severity == 'critical' ? 300 :\n        event.data.severity == 'high' ? 120 :\n        event.data.user_plan == 'enterprise' ? 60 : 0\n      `\n    },\n    triggers: [{ event: \"support\u002Fticket.created\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Critical tickets get highest priority (300s ahead)\n    \u002F\u002F High severity: 120s ahead\n    \u002F\u002F Enterprise users: 60s ahead\n    \u002F\u002F Everyone else: normal priority\n  }\n);\n```\n\n## Singleton\n\n**When to use:** Ensure only one instance of a function runs at a time.\n\n### Skip Mode (Preserve Current Run)\n\n```typescript\ninngest.createFunction(\n  {\n    id: \"data-backup\",\n    singleton: {\n      key: \"event.data.database_id\",\n      mode: \"skip\"\n    },\n    triggers: [{ event: \"backup\u002Frequested\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Skip new backups if one is already running for this database\n    await step.run(\"backup\", () => performBackup(event.data.database_id));\n  }\n);\n```\n\n### Cancel Mode (Use Latest Event)\n\n```typescript\ninngest.createFunction(\n  {\n    id: \"realtime-sync\",\n    singleton: {\n      key: \"event.data.user_id\",\n      mode: \"cancel\"\n    },\n    triggers: [{ event: \"user\u002Fdata.changed\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Cancel previous sync and start with latest data\n    await step.run(\"sync\", () => syncUserData(event.data));\n  }\n);\n```\n\n## Batching\n\n**When to use:** Process multiple events together for efficiency.\n\n```typescript\ninngest.createFunction(\n  {\n    id: \"bulk-email-send\",\n    batchEvents: {\n      maxSize: 100, \u002F\u002F Up to 100 events\n      timeout: \"30s\", \u002F\u002F Or 30 seconds, whichever first\n      \u002F\u002F `key` groups events into separate batches per unique value\n      \u002F\u002F This is different from expressions `if` which filters events\n      key: \"event.data.campaign_id\" \u002F\u002F Batch per campaign\n    },\n    triggers: [{ event: \"email\u002Fsend.queued\" }]\n  },\n  async ({ events, step }) => {\n    \u002F\u002F Process array of events together\n    const emails = events.map((evt) => ({\n      to: evt.data.email,\n      subject: evt.data.subject,\n      body: evt.data.body\n    }));\n\n    await step.run(\"send-batch\", () => emailService.sendBulk(emails));\n  }\n);\n```\n\n## Combining Flow Control\n\n### Example: Fair AI Processing\n\n```typescript\ninngest.createFunction(\n  {\n    id: \"ai-image-processing\",\n    \u002F\u002F Global throttling for API limits\n    throttle: {\n      limit: 50,\n      period: \"60s\",\n      key: `\"gpu-cluster\"`\n    },\n    \u002F\u002F Per-user concurrency for fairness\n    concurrency: [\n      {\n        key: \"event.data.user_id\",\n        limit: 3\n      }\n    ],\n    \u002F\u002F VIP users get priority\n    priority: {\n      run: \"event.data.plan == 'pro' ? 60 : 0\"\n    },\n    triggers: [{ event: \"ai\u002Fimage.generate\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Combines multiple flow controls for optimal resource usage\n  }\n);\n```\n\n**Pro tip:** Most production functions benefit from combining 1-3 flow control mechanisms for optimal reliability and performance.\n",{"data":42,"body":43},{"name":4,"description":6},{"type":44,"children":45},"root",[46,54,60,86,93,168,174,184,211,218,561,567,580,860,866,1158,1166,1184,1190,1199,1209,1611,1619,1665,1671,1680,1690,1971,1979,1997,2003,2012,2388,2396,2414,2420,2429,2662,2670,2944,2950,2959,2965,3304,3310,3636,3642,3651,4234,4240,4246,4672,4682],{"type":47,"tag":48,"props":49,"children":50},"element","h1",{"id":4},[51],{"type":52,"value":53},"text","Inngest Flow Control",{"type":47,"tag":55,"props":56,"children":57},"p",{},[58],{"type":52,"value":59},"Master Inngest flow control mechanisms to manage resources, prevent overloading systems, and ensure application reliability. This skill covers all flow control options with prescriptive guidance on when and how to use each.",{"type":47,"tag":61,"props":62,"children":63},"blockquote",{},[64],{"type":47,"tag":55,"props":65,"children":66},{},[67,73,75,84],{"type":47,"tag":68,"props":69,"children":70},"strong",{},[71],{"type":52,"value":72},"These skills are focused on TypeScript.",{"type":52,"value":74}," For Python or Go, refer to the ",{"type":47,"tag":76,"props":77,"children":81},"a",{"href":78,"rel":79},"https:\u002F\u002Fwww.inngest.com\u002Fllms.txt",[80],"nofollow",[82],{"type":52,"value":83},"Inngest documentation",{"type":52,"value":85}," for language-specific guidance. Core concepts apply across all languages.",{"type":47,"tag":87,"props":88,"children":90},"h2",{"id":89},"quick-decision-guide",[91],{"type":52,"value":92},"Quick Decision Guide",{"type":47,"tag":94,"props":95,"children":96},"ul",{},[97,108,118,128,138,148,158],{"type":47,"tag":98,"props":99,"children":100},"li",{},[101,106],{"type":47,"tag":68,"props":102,"children":103},{},[104],{"type":52,"value":105},"\"Limit how many run at once\"",{"type":52,"value":107}," → Concurrency",{"type":47,"tag":98,"props":109,"children":110},{},[111,116],{"type":47,"tag":68,"props":112,"children":113},{},[114],{"type":52,"value":115},"\"Spread runs over time\"",{"type":52,"value":117}," → Throttling",{"type":47,"tag":98,"props":119,"children":120},{},[121,126],{"type":47,"tag":68,"props":122,"children":123},{},[124],{"type":52,"value":125},"\"Block after N runs in a period\"",{"type":52,"value":127}," → Rate Limiting",{"type":47,"tag":98,"props":129,"children":130},{},[131,136],{"type":47,"tag":68,"props":132,"children":133},{},[134],{"type":52,"value":135},"\"Wait for activity to stop, then run once\"",{"type":52,"value":137}," → Debounce",{"type":47,"tag":98,"props":139,"children":140},{},[141,146],{"type":47,"tag":68,"props":142,"children":143},{},[144],{"type":52,"value":145},"\"Only one run at a time for this key\"",{"type":52,"value":147}," → Singleton",{"type":47,"tag":98,"props":149,"children":150},{},[151,156],{"type":47,"tag":68,"props":152,"children":153},{},[154],{"type":52,"value":155},"\"Process events in groups\"",{"type":52,"value":157}," → Batching",{"type":47,"tag":98,"props":159,"children":160},{},[161,166],{"type":47,"tag":68,"props":162,"children":163},{},[164],{"type":52,"value":165},"\"Some runs are more important\"",{"type":52,"value":167}," → Priority",{"type":47,"tag":87,"props":169,"children":171},{"id":170},"concurrency",[172],{"type":52,"value":173},"Concurrency",{"type":47,"tag":55,"props":175,"children":176},{},[177,182],{"type":47,"tag":68,"props":178,"children":179},{},[180],{"type":52,"value":181},"When to use:",{"type":52,"value":183}," Limit the number of executing steps (not function runs) to manage computing resources and prevent system overwhelm.",{"type":47,"tag":55,"props":185,"children":186},{},[187,192,194,201,203,209],{"type":47,"tag":68,"props":188,"children":189},{},[190],{"type":52,"value":191},"Key insight:",{"type":52,"value":193}," Concurrency limits active code execution, not function runs. A function waiting on ",{"type":47,"tag":195,"props":196,"children":198},"code",{"className":197},[],[199],{"type":52,"value":200},"step.sleep()",{"type":52,"value":202}," or ",{"type":47,"tag":195,"props":204,"children":206},{"className":205},[],[207],{"type":52,"value":208},"step.waitForEvent()",{"type":52,"value":210}," doesn't count against the limit.",{"type":47,"tag":212,"props":213,"children":215},"h3",{"id":214},"basic-concurrency",[216],{"type":52,"value":217},"Basic Concurrency",{"type":47,"tag":219,"props":220,"children":225},"pre",{"className":221,"code":222,"language":223,"meta":224,"style":224},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","inngest.createFunction(\n  {\n    id: \"process-images\",\n    concurrency: 5,\n    triggers: [{ event: \"media\u002Fimage.uploaded\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Only 5 steps can execute simultaneously\n    await step.run(\"resize\", () => resizeImage(event.data.imageUrl));\n  }\n);\n","typescript","",[226],{"type":47,"tag":195,"props":227,"children":228},{"__ignoreMap":224},[229,257,266,302,325,379,388,433,443,539,548],{"type":47,"tag":230,"props":231,"children":234},"span",{"class":232,"line":233},"line",1,[235,240,246,252],{"type":47,"tag":230,"props":236,"children":238},{"style":237},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[239],{"type":52,"value":8},{"type":47,"tag":230,"props":241,"children":243},{"style":242},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[244],{"type":52,"value":245},".",{"type":47,"tag":230,"props":247,"children":249},{"style":248},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[250],{"type":52,"value":251},"createFunction",{"type":47,"tag":230,"props":253,"children":254},{"style":237},[255],{"type":52,"value":256},"(\n",{"type":47,"tag":230,"props":258,"children":260},{"class":232,"line":259},2,[261],{"type":47,"tag":230,"props":262,"children":263},{"style":242},[264],{"type":52,"value":265},"  {\n",{"type":47,"tag":230,"props":267,"children":269},{"class":232,"line":268},3,[270,276,281,286,292,297],{"type":47,"tag":230,"props":271,"children":273},{"style":272},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[274],{"type":52,"value":275},"    id",{"type":47,"tag":230,"props":277,"children":278},{"style":242},[279],{"type":52,"value":280},":",{"type":47,"tag":230,"props":282,"children":283},{"style":242},[284],{"type":52,"value":285}," \"",{"type":47,"tag":230,"props":287,"children":289},{"style":288},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[290],{"type":52,"value":291},"process-images",{"type":47,"tag":230,"props":293,"children":294},{"style":242},[295],{"type":52,"value":296},"\"",{"type":47,"tag":230,"props":298,"children":299},{"style":242},[300],{"type":52,"value":301},",\n",{"type":47,"tag":230,"props":303,"children":305},{"class":232,"line":304},4,[306,311,315,321],{"type":47,"tag":230,"props":307,"children":308},{"style":272},[309],{"type":52,"value":310},"    concurrency",{"type":47,"tag":230,"props":312,"children":313},{"style":242},[314],{"type":52,"value":280},{"type":47,"tag":230,"props":316,"children":318},{"style":317},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[319],{"type":52,"value":320}," 5",{"type":47,"tag":230,"props":322,"children":323},{"style":242},[324],{"type":52,"value":301},{"type":47,"tag":230,"props":326,"children":327},{"class":232,"line":27},[328,333,337,342,347,352,356,360,365,369,374],{"type":47,"tag":230,"props":329,"children":330},{"style":272},[331],{"type":52,"value":332},"    triggers",{"type":47,"tag":230,"props":334,"children":335},{"style":242},[336],{"type":52,"value":280},{"type":47,"tag":230,"props":338,"children":339},{"style":237},[340],{"type":52,"value":341}," [",{"type":47,"tag":230,"props":343,"children":344},{"style":242},[345],{"type":52,"value":346},"{",{"type":47,"tag":230,"props":348,"children":349},{"style":272},[350],{"type":52,"value":351}," event",{"type":47,"tag":230,"props":353,"children":354},{"style":242},[355],{"type":52,"value":280},{"type":47,"tag":230,"props":357,"children":358},{"style":242},[359],{"type":52,"value":285},{"type":47,"tag":230,"props":361,"children":362},{"style":288},[363],{"type":52,"value":364},"media\u002Fimage.uploaded",{"type":47,"tag":230,"props":366,"children":367},{"style":242},[368],{"type":52,"value":296},{"type":47,"tag":230,"props":370,"children":371},{"style":242},[372],{"type":52,"value":373}," }",{"type":47,"tag":230,"props":375,"children":376},{"style":237},[377],{"type":52,"value":378},"]\n",{"type":47,"tag":230,"props":380,"children":382},{"class":232,"line":381},6,[383],{"type":47,"tag":230,"props":384,"children":385},{"style":242},[386],{"type":52,"value":387},"  },\n",{"type":47,"tag":230,"props":389,"children":391},{"class":232,"line":390},7,[392,398,403,408,413,418,423,428],{"type":47,"tag":230,"props":393,"children":395},{"style":394},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[396],{"type":52,"value":397},"  async",{"type":47,"tag":230,"props":399,"children":400},{"style":242},[401],{"type":52,"value":402}," ({",{"type":47,"tag":230,"props":404,"children":406},{"style":405},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[407],{"type":52,"value":351},{"type":47,"tag":230,"props":409,"children":410},{"style":242},[411],{"type":52,"value":412},",",{"type":47,"tag":230,"props":414,"children":415},{"style":405},[416],{"type":52,"value":417}," step",{"type":47,"tag":230,"props":419,"children":420},{"style":242},[421],{"type":52,"value":422}," })",{"type":47,"tag":230,"props":424,"children":425},{"style":394},[426],{"type":52,"value":427}," =>",{"type":47,"tag":230,"props":429,"children":430},{"style":242},[431],{"type":52,"value":432}," {\n",{"type":47,"tag":230,"props":434,"children":436},{"class":232,"line":435},8,[437],{"type":47,"tag":230,"props":438,"children":440},{"style":439},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[441],{"type":52,"value":442},"    \u002F\u002F Only 5 steps can execute simultaneously\n",{"type":47,"tag":230,"props":444,"children":446},{"class":232,"line":445},9,[447,453,457,461,466,471,475,480,484,488,493,497,502,506,511,515,520,524,529,534],{"type":47,"tag":230,"props":448,"children":450},{"style":449},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[451],{"type":52,"value":452},"    await",{"type":47,"tag":230,"props":454,"children":455},{"style":237},[456],{"type":52,"value":417},{"type":47,"tag":230,"props":458,"children":459},{"style":242},[460],{"type":52,"value":245},{"type":47,"tag":230,"props":462,"children":463},{"style":248},[464],{"type":52,"value":465},"run",{"type":47,"tag":230,"props":467,"children":468},{"style":272},[469],{"type":52,"value":470},"(",{"type":47,"tag":230,"props":472,"children":473},{"style":242},[474],{"type":52,"value":296},{"type":47,"tag":230,"props":476,"children":477},{"style":288},[478],{"type":52,"value":479},"resize",{"type":47,"tag":230,"props":481,"children":482},{"style":242},[483],{"type":52,"value":296},{"type":47,"tag":230,"props":485,"children":486},{"style":242},[487],{"type":52,"value":412},{"type":47,"tag":230,"props":489,"children":490},{"style":242},[491],{"type":52,"value":492}," ()",{"type":47,"tag":230,"props":494,"children":495},{"style":394},[496],{"type":52,"value":427},{"type":47,"tag":230,"props":498,"children":499},{"style":248},[500],{"type":52,"value":501}," resizeImage",{"type":47,"tag":230,"props":503,"children":504},{"style":272},[505],{"type":52,"value":470},{"type":47,"tag":230,"props":507,"children":508},{"style":237},[509],{"type":52,"value":510},"event",{"type":47,"tag":230,"props":512,"children":513},{"style":242},[514],{"type":52,"value":245},{"type":47,"tag":230,"props":516,"children":517},{"style":237},[518],{"type":52,"value":519},"data",{"type":47,"tag":230,"props":521,"children":522},{"style":242},[523],{"type":52,"value":245},{"type":47,"tag":230,"props":525,"children":526},{"style":237},[527],{"type":52,"value":528},"imageUrl",{"type":47,"tag":230,"props":530,"children":531},{"style":272},[532],{"type":52,"value":533},"))",{"type":47,"tag":230,"props":535,"children":536},{"style":242},[537],{"type":52,"value":538},";\n",{"type":47,"tag":230,"props":540,"children":542},{"class":232,"line":541},10,[543],{"type":47,"tag":230,"props":544,"children":545},{"style":242},[546],{"type":52,"value":547},"  }\n",{"type":47,"tag":230,"props":549,"children":551},{"class":232,"line":550},11,[552,557],{"type":47,"tag":230,"props":553,"children":554},{"style":237},[555],{"type":52,"value":556},")",{"type":47,"tag":230,"props":558,"children":559},{"style":242},[560],{"type":52,"value":538},{"type":47,"tag":212,"props":562,"children":564},{"id":563},"concurrency-with-keys-multi-tenant",[565],{"type":52,"value":566},"Concurrency with Keys (Multi-tenant)",{"type":47,"tag":55,"props":568,"children":569},{},[570,572,578],{"type":52,"value":571},"Use ",{"type":47,"tag":195,"props":573,"children":575},{"className":574},[],[576],{"type":52,"value":577},"key",{"type":52,"value":579}," parameter to apply limit per unique value of the key.",{"type":47,"tag":219,"props":581,"children":583},{"className":221,"code":582,"language":223,"meta":224,"style":224},"inngest.createFunction(\n  {\n    id: \"user-sync\",\n    concurrency: [\n      {\n        key: \"event.data.user_id\",\n        limit: 1\n      }\n    ],\n    triggers: [{ event: \"user\u002Fprofile.updated\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Only 1 step per user can execute at once\n    \u002F\u002F Prevents race conditions in user-specific operations\n  }\n);\n",[584],{"type":47,"tag":195,"props":585,"children":586},{"__ignoreMap":224},[587,606,613,641,657,665,694,711,719,731,779,786,822,831,840,848],{"type":47,"tag":230,"props":588,"children":589},{"class":232,"line":233},[590,594,598,602],{"type":47,"tag":230,"props":591,"children":592},{"style":237},[593],{"type":52,"value":8},{"type":47,"tag":230,"props":595,"children":596},{"style":242},[597],{"type":52,"value":245},{"type":47,"tag":230,"props":599,"children":600},{"style":248},[601],{"type":52,"value":251},{"type":47,"tag":230,"props":603,"children":604},{"style":237},[605],{"type":52,"value":256},{"type":47,"tag":230,"props":607,"children":608},{"class":232,"line":259},[609],{"type":47,"tag":230,"props":610,"children":611},{"style":242},[612],{"type":52,"value":265},{"type":47,"tag":230,"props":614,"children":615},{"class":232,"line":268},[616,620,624,628,633,637],{"type":47,"tag":230,"props":617,"children":618},{"style":272},[619],{"type":52,"value":275},{"type":47,"tag":230,"props":621,"children":622},{"style":242},[623],{"type":52,"value":280},{"type":47,"tag":230,"props":625,"children":626},{"style":242},[627],{"type":52,"value":285},{"type":47,"tag":230,"props":629,"children":630},{"style":288},[631],{"type":52,"value":632},"user-sync",{"type":47,"tag":230,"props":634,"children":635},{"style":242},[636],{"type":52,"value":296},{"type":47,"tag":230,"props":638,"children":639},{"style":242},[640],{"type":52,"value":301},{"type":47,"tag":230,"props":642,"children":643},{"class":232,"line":304},[644,648,652],{"type":47,"tag":230,"props":645,"children":646},{"style":272},[647],{"type":52,"value":310},{"type":47,"tag":230,"props":649,"children":650},{"style":242},[651],{"type":52,"value":280},{"type":47,"tag":230,"props":653,"children":654},{"style":237},[655],{"type":52,"value":656}," [\n",{"type":47,"tag":230,"props":658,"children":659},{"class":232,"line":27},[660],{"type":47,"tag":230,"props":661,"children":662},{"style":242},[663],{"type":52,"value":664},"      {\n",{"type":47,"tag":230,"props":666,"children":667},{"class":232,"line":381},[668,673,677,681,686,690],{"type":47,"tag":230,"props":669,"children":670},{"style":272},[671],{"type":52,"value":672},"        key",{"type":47,"tag":230,"props":674,"children":675},{"style":242},[676],{"type":52,"value":280},{"type":47,"tag":230,"props":678,"children":679},{"style":242},[680],{"type":52,"value":285},{"type":47,"tag":230,"props":682,"children":683},{"style":288},[684],{"type":52,"value":685},"event.data.user_id",{"type":47,"tag":230,"props":687,"children":688},{"style":242},[689],{"type":52,"value":296},{"type":47,"tag":230,"props":691,"children":692},{"style":242},[693],{"type":52,"value":301},{"type":47,"tag":230,"props":695,"children":696},{"class":232,"line":390},[697,702,706],{"type":47,"tag":230,"props":698,"children":699},{"style":272},[700],{"type":52,"value":701},"        limit",{"type":47,"tag":230,"props":703,"children":704},{"style":242},[705],{"type":52,"value":280},{"type":47,"tag":230,"props":707,"children":708},{"style":317},[709],{"type":52,"value":710}," 1\n",{"type":47,"tag":230,"props":712,"children":713},{"class":232,"line":435},[714],{"type":47,"tag":230,"props":715,"children":716},{"style":242},[717],{"type":52,"value":718},"      }\n",{"type":47,"tag":230,"props":720,"children":721},{"class":232,"line":445},[722,727],{"type":47,"tag":230,"props":723,"children":724},{"style":237},[725],{"type":52,"value":726},"    ]",{"type":47,"tag":230,"props":728,"children":729},{"style":242},[730],{"type":52,"value":301},{"type":47,"tag":230,"props":732,"children":733},{"class":232,"line":541},[734,738,742,746,750,754,758,762,767,771,775],{"type":47,"tag":230,"props":735,"children":736},{"style":272},[737],{"type":52,"value":332},{"type":47,"tag":230,"props":739,"children":740},{"style":242},[741],{"type":52,"value":280},{"type":47,"tag":230,"props":743,"children":744},{"style":237},[745],{"type":52,"value":341},{"type":47,"tag":230,"props":747,"children":748},{"style":242},[749],{"type":52,"value":346},{"type":47,"tag":230,"props":751,"children":752},{"style":272},[753],{"type":52,"value":351},{"type":47,"tag":230,"props":755,"children":756},{"style":242},[757],{"type":52,"value":280},{"type":47,"tag":230,"props":759,"children":760},{"style":242},[761],{"type":52,"value":285},{"type":47,"tag":230,"props":763,"children":764},{"style":288},[765],{"type":52,"value":766},"user\u002Fprofile.updated",{"type":47,"tag":230,"props":768,"children":769},{"style":242},[770],{"type":52,"value":296},{"type":47,"tag":230,"props":772,"children":773},{"style":242},[774],{"type":52,"value":373},{"type":47,"tag":230,"props":776,"children":777},{"style":237},[778],{"type":52,"value":378},{"type":47,"tag":230,"props":780,"children":781},{"class":232,"line":550},[782],{"type":47,"tag":230,"props":783,"children":784},{"style":242},[785],{"type":52,"value":387},{"type":47,"tag":230,"props":787,"children":789},{"class":232,"line":788},12,[790,794,798,802,806,810,814,818],{"type":47,"tag":230,"props":791,"children":792},{"style":394},[793],{"type":52,"value":397},{"type":47,"tag":230,"props":795,"children":796},{"style":242},[797],{"type":52,"value":402},{"type":47,"tag":230,"props":799,"children":800},{"style":405},[801],{"type":52,"value":351},{"type":47,"tag":230,"props":803,"children":804},{"style":242},[805],{"type":52,"value":412},{"type":47,"tag":230,"props":807,"children":808},{"style":405},[809],{"type":52,"value":417},{"type":47,"tag":230,"props":811,"children":812},{"style":242},[813],{"type":52,"value":422},{"type":47,"tag":230,"props":815,"children":816},{"style":394},[817],{"type":52,"value":427},{"type":47,"tag":230,"props":819,"children":820},{"style":242},[821],{"type":52,"value":432},{"type":47,"tag":230,"props":823,"children":825},{"class":232,"line":824},13,[826],{"type":47,"tag":230,"props":827,"children":828},{"style":439},[829],{"type":52,"value":830},"    \u002F\u002F Only 1 step per user can execute at once\n",{"type":47,"tag":230,"props":832,"children":834},{"class":232,"line":833},14,[835],{"type":47,"tag":230,"props":836,"children":837},{"style":439},[838],{"type":52,"value":839},"    \u002F\u002F Prevents race conditions in user-specific operations\n",{"type":47,"tag":230,"props":841,"children":843},{"class":232,"line":842},15,[844],{"type":47,"tag":230,"props":845,"children":846},{"style":242},[847],{"type":52,"value":547},{"type":47,"tag":230,"props":849,"children":851},{"class":232,"line":850},16,[852,856],{"type":47,"tag":230,"props":853,"children":854},{"style":237},[855],{"type":52,"value":556},{"type":47,"tag":230,"props":857,"children":858},{"style":242},[859],{"type":52,"value":538},{"type":47,"tag":212,"props":861,"children":863},{"id":862},"account-level-shared-limits",[864],{"type":52,"value":865},"Account-level Shared Limits",{"type":47,"tag":219,"props":867,"children":869},{"className":221,"code":868,"language":223,"meta":224,"style":224},"inngest.createFunction(\n  {\n    id: \"ai-summary\",\n    concurrency: [\n      {\n        scope: \"account\",\n        key: `\"openai\"`,\n        limit: 60\n      }\n    ],\n    triggers: [{ event: \"ai\u002Fsummary.requested\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Share 60 concurrent OpenAI calls across all functions\n  }\n);\n",[870],{"type":47,"tag":195,"props":871,"children":872},{"__ignoreMap":224},[873,892,899,927,942,949,978,1008,1024,1031,1042,1090,1097,1132,1140,1147],{"type":47,"tag":230,"props":874,"children":875},{"class":232,"line":233},[876,880,884,888],{"type":47,"tag":230,"props":877,"children":878},{"style":237},[879],{"type":52,"value":8},{"type":47,"tag":230,"props":881,"children":882},{"style":242},[883],{"type":52,"value":245},{"type":47,"tag":230,"props":885,"children":886},{"style":248},[887],{"type":52,"value":251},{"type":47,"tag":230,"props":889,"children":890},{"style":237},[891],{"type":52,"value":256},{"type":47,"tag":230,"props":893,"children":894},{"class":232,"line":259},[895],{"type":47,"tag":230,"props":896,"children":897},{"style":242},[898],{"type":52,"value":265},{"type":47,"tag":230,"props":900,"children":901},{"class":232,"line":268},[902,906,910,914,919,923],{"type":47,"tag":230,"props":903,"children":904},{"style":272},[905],{"type":52,"value":275},{"type":47,"tag":230,"props":907,"children":908},{"style":242},[909],{"type":52,"value":280},{"type":47,"tag":230,"props":911,"children":912},{"style":242},[913],{"type":52,"value":285},{"type":47,"tag":230,"props":915,"children":916},{"style":288},[917],{"type":52,"value":918},"ai-summary",{"type":47,"tag":230,"props":920,"children":921},{"style":242},[922],{"type":52,"value":296},{"type":47,"tag":230,"props":924,"children":925},{"style":242},[926],{"type":52,"value":301},{"type":47,"tag":230,"props":928,"children":929},{"class":232,"line":304},[930,934,938],{"type":47,"tag":230,"props":931,"children":932},{"style":272},[933],{"type":52,"value":310},{"type":47,"tag":230,"props":935,"children":936},{"style":242},[937],{"type":52,"value":280},{"type":47,"tag":230,"props":939,"children":940},{"style":237},[941],{"type":52,"value":656},{"type":47,"tag":230,"props":943,"children":944},{"class":232,"line":27},[945],{"type":47,"tag":230,"props":946,"children":947},{"style":242},[948],{"type":52,"value":664},{"type":47,"tag":230,"props":950,"children":951},{"class":232,"line":381},[952,957,961,965,970,974],{"type":47,"tag":230,"props":953,"children":954},{"style":272},[955],{"type":52,"value":956},"        scope",{"type":47,"tag":230,"props":958,"children":959},{"style":242},[960],{"type":52,"value":280},{"type":47,"tag":230,"props":962,"children":963},{"style":242},[964],{"type":52,"value":285},{"type":47,"tag":230,"props":966,"children":967},{"style":288},[968],{"type":52,"value":969},"account",{"type":47,"tag":230,"props":971,"children":972},{"style":242},[973],{"type":52,"value":296},{"type":47,"tag":230,"props":975,"children":976},{"style":242},[977],{"type":52,"value":301},{"type":47,"tag":230,"props":979,"children":980},{"class":232,"line":390},[981,985,989,994,999,1004],{"type":47,"tag":230,"props":982,"children":983},{"style":272},[984],{"type":52,"value":672},{"type":47,"tag":230,"props":986,"children":987},{"style":242},[988],{"type":52,"value":280},{"type":47,"tag":230,"props":990,"children":991},{"style":242},[992],{"type":52,"value":993}," `",{"type":47,"tag":230,"props":995,"children":996},{"style":288},[997],{"type":52,"value":998},"\"openai\"",{"type":47,"tag":230,"props":1000,"children":1001},{"style":242},[1002],{"type":52,"value":1003},"`",{"type":47,"tag":230,"props":1005,"children":1006},{"style":242},[1007],{"type":52,"value":301},{"type":47,"tag":230,"props":1009,"children":1010},{"class":232,"line":435},[1011,1015,1019],{"type":47,"tag":230,"props":1012,"children":1013},{"style":272},[1014],{"type":52,"value":701},{"type":47,"tag":230,"props":1016,"children":1017},{"style":242},[1018],{"type":52,"value":280},{"type":47,"tag":230,"props":1020,"children":1021},{"style":317},[1022],{"type":52,"value":1023}," 60\n",{"type":47,"tag":230,"props":1025,"children":1026},{"class":232,"line":445},[1027],{"type":47,"tag":230,"props":1028,"children":1029},{"style":242},[1030],{"type":52,"value":718},{"type":47,"tag":230,"props":1032,"children":1033},{"class":232,"line":541},[1034,1038],{"type":47,"tag":230,"props":1035,"children":1036},{"style":237},[1037],{"type":52,"value":726},{"type":47,"tag":230,"props":1039,"children":1040},{"style":242},[1041],{"type":52,"value":301},{"type":47,"tag":230,"props":1043,"children":1044},{"class":232,"line":550},[1045,1049,1053,1057,1061,1065,1069,1073,1078,1082,1086],{"type":47,"tag":230,"props":1046,"children":1047},{"style":272},[1048],{"type":52,"value":332},{"type":47,"tag":230,"props":1050,"children":1051},{"style":242},[1052],{"type":52,"value":280},{"type":47,"tag":230,"props":1054,"children":1055},{"style":237},[1056],{"type":52,"value":341},{"type":47,"tag":230,"props":1058,"children":1059},{"style":242},[1060],{"type":52,"value":346},{"type":47,"tag":230,"props":1062,"children":1063},{"style":272},[1064],{"type":52,"value":351},{"type":47,"tag":230,"props":1066,"children":1067},{"style":242},[1068],{"type":52,"value":280},{"type":47,"tag":230,"props":1070,"children":1071},{"style":242},[1072],{"type":52,"value":285},{"type":47,"tag":230,"props":1074,"children":1075},{"style":288},[1076],{"type":52,"value":1077},"ai\u002Fsummary.requested",{"type":47,"tag":230,"props":1079,"children":1080},{"style":242},[1081],{"type":52,"value":296},{"type":47,"tag":230,"props":1083,"children":1084},{"style":242},[1085],{"type":52,"value":373},{"type":47,"tag":230,"props":1087,"children":1088},{"style":237},[1089],{"type":52,"value":378},{"type":47,"tag":230,"props":1091,"children":1092},{"class":232,"line":788},[1093],{"type":47,"tag":230,"props":1094,"children":1095},{"style":242},[1096],{"type":52,"value":387},{"type":47,"tag":230,"props":1098,"children":1099},{"class":232,"line":824},[1100,1104,1108,1112,1116,1120,1124,1128],{"type":47,"tag":230,"props":1101,"children":1102},{"style":394},[1103],{"type":52,"value":397},{"type":47,"tag":230,"props":1105,"children":1106},{"style":242},[1107],{"type":52,"value":402},{"type":47,"tag":230,"props":1109,"children":1110},{"style":405},[1111],{"type":52,"value":351},{"type":47,"tag":230,"props":1113,"children":1114},{"style":242},[1115],{"type":52,"value":412},{"type":47,"tag":230,"props":1117,"children":1118},{"style":405},[1119],{"type":52,"value":417},{"type":47,"tag":230,"props":1121,"children":1122},{"style":242},[1123],{"type":52,"value":422},{"type":47,"tag":230,"props":1125,"children":1126},{"style":394},[1127],{"type":52,"value":427},{"type":47,"tag":230,"props":1129,"children":1130},{"style":242},[1131],{"type":52,"value":432},{"type":47,"tag":230,"props":1133,"children":1134},{"class":232,"line":833},[1135],{"type":47,"tag":230,"props":1136,"children":1137},{"style":439},[1138],{"type":52,"value":1139},"    \u002F\u002F Share 60 concurrent OpenAI calls across all functions\n",{"type":47,"tag":230,"props":1141,"children":1142},{"class":232,"line":842},[1143],{"type":47,"tag":230,"props":1144,"children":1145},{"style":242},[1146],{"type":52,"value":547},{"type":47,"tag":230,"props":1148,"children":1149},{"class":232,"line":850},[1150,1154],{"type":47,"tag":230,"props":1151,"children":1152},{"style":237},[1153],{"type":52,"value":556},{"type":47,"tag":230,"props":1155,"children":1156},{"style":242},[1157],{"type":52,"value":538},{"type":47,"tag":55,"props":1159,"children":1160},{},[1161],{"type":47,"tag":68,"props":1162,"children":1163},{},[1164],{"type":52,"value":1165},"When to use each:",{"type":47,"tag":94,"props":1167,"children":1168},{},[1169,1174,1179],{"type":47,"tag":98,"props":1170,"children":1171},{},[1172],{"type":52,"value":1173},"Basic: Protect databases or limit general capacity",{"type":47,"tag":98,"props":1175,"children":1176},{},[1177],{"type":52,"value":1178},"Keyed: Multi-tenant fairness, prevent \"noisy neighbor\" issues",{"type":47,"tag":98,"props":1180,"children":1181},{},[1182],{"type":52,"value":1183},"Account-level: Share quotas across multiple functions (API limits)",{"type":47,"tag":87,"props":1185,"children":1187},{"id":1186},"throttling",[1188],{"type":52,"value":1189},"Throttling",{"type":47,"tag":55,"props":1191,"children":1192},{},[1193,1197],{"type":47,"tag":68,"props":1194,"children":1195},{},[1196],{"type":52,"value":181},{"type":52,"value":1198}," Control the rate of function starts over time to work around API rate limits or smooth traffic spikes.",{"type":47,"tag":55,"props":1200,"children":1201},{},[1202,1207],{"type":47,"tag":68,"props":1203,"children":1204},{},[1205],{"type":52,"value":1206},"Key difference from concurrency:",{"type":52,"value":1208}," Throttling limits function run starts; concurrency limits step execution.",{"type":47,"tag":219,"props":1210,"children":1212},{"className":221,"code":1211,"language":223,"meta":224,"style":224},"inngest.createFunction(\n  {\n    id: \"sync-crm-data\",\n    throttle: {\n      limit: 10, \u002F\u002F 10 function starts\n      period: \"60s\", \u002F\u002F per minute\n      burst: 5, \u002F\u002F plus 5 immediate bursts\n      key: \"event.data.customer_id\" \u002F\u002F per customer\n    },\n    triggers: [{ event: \"crm\u002Fcontact.updated\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Respects CRM API rate limits: 10 calls\u002Fmin per customer\n    await step.run(\"sync\", () => crmApi.updateContact(event.data));\n  }\n);\n",[1213],{"type":47,"tag":195,"props":1214,"children":1215},{"__ignoreMap":224},[1216,1235,1242,1270,1286,1312,1346,1371,1401,1409,1457,1464,1499,1507,1593,1600],{"type":47,"tag":230,"props":1217,"children":1218},{"class":232,"line":233},[1219,1223,1227,1231],{"type":47,"tag":230,"props":1220,"children":1221},{"style":237},[1222],{"type":52,"value":8},{"type":47,"tag":230,"props":1224,"children":1225},{"style":242},[1226],{"type":52,"value":245},{"type":47,"tag":230,"props":1228,"children":1229},{"style":248},[1230],{"type":52,"value":251},{"type":47,"tag":230,"props":1232,"children":1233},{"style":237},[1234],{"type":52,"value":256},{"type":47,"tag":230,"props":1236,"children":1237},{"class":232,"line":259},[1238],{"type":47,"tag":230,"props":1239,"children":1240},{"style":242},[1241],{"type":52,"value":265},{"type":47,"tag":230,"props":1243,"children":1244},{"class":232,"line":268},[1245,1249,1253,1257,1262,1266],{"type":47,"tag":230,"props":1246,"children":1247},{"style":272},[1248],{"type":52,"value":275},{"type":47,"tag":230,"props":1250,"children":1251},{"style":242},[1252],{"type":52,"value":280},{"type":47,"tag":230,"props":1254,"children":1255},{"style":242},[1256],{"type":52,"value":285},{"type":47,"tag":230,"props":1258,"children":1259},{"style":288},[1260],{"type":52,"value":1261},"sync-crm-data",{"type":47,"tag":230,"props":1263,"children":1264},{"style":242},[1265],{"type":52,"value":296},{"type":47,"tag":230,"props":1267,"children":1268},{"style":242},[1269],{"type":52,"value":301},{"type":47,"tag":230,"props":1271,"children":1272},{"class":232,"line":304},[1273,1278,1282],{"type":47,"tag":230,"props":1274,"children":1275},{"style":272},[1276],{"type":52,"value":1277},"    throttle",{"type":47,"tag":230,"props":1279,"children":1280},{"style":242},[1281],{"type":52,"value":280},{"type":47,"tag":230,"props":1283,"children":1284},{"style":242},[1285],{"type":52,"value":432},{"type":47,"tag":230,"props":1287,"children":1288},{"class":232,"line":27},[1289,1294,1298,1303,1307],{"type":47,"tag":230,"props":1290,"children":1291},{"style":272},[1292],{"type":52,"value":1293},"      limit",{"type":47,"tag":230,"props":1295,"children":1296},{"style":242},[1297],{"type":52,"value":280},{"type":47,"tag":230,"props":1299,"children":1300},{"style":317},[1301],{"type":52,"value":1302}," 10",{"type":47,"tag":230,"props":1304,"children":1305},{"style":242},[1306],{"type":52,"value":412},{"type":47,"tag":230,"props":1308,"children":1309},{"style":439},[1310],{"type":52,"value":1311}," \u002F\u002F 10 function starts\n",{"type":47,"tag":230,"props":1313,"children":1314},{"class":232,"line":381},[1315,1320,1324,1328,1333,1337,1341],{"type":47,"tag":230,"props":1316,"children":1317},{"style":272},[1318],{"type":52,"value":1319},"      period",{"type":47,"tag":230,"props":1321,"children":1322},{"style":242},[1323],{"type":52,"value":280},{"type":47,"tag":230,"props":1325,"children":1326},{"style":242},[1327],{"type":52,"value":285},{"type":47,"tag":230,"props":1329,"children":1330},{"style":288},[1331],{"type":52,"value":1332},"60s",{"type":47,"tag":230,"props":1334,"children":1335},{"style":242},[1336],{"type":52,"value":296},{"type":47,"tag":230,"props":1338,"children":1339},{"style":242},[1340],{"type":52,"value":412},{"type":47,"tag":230,"props":1342,"children":1343},{"style":439},[1344],{"type":52,"value":1345}," \u002F\u002F per minute\n",{"type":47,"tag":230,"props":1347,"children":1348},{"class":232,"line":390},[1349,1354,1358,1362,1366],{"type":47,"tag":230,"props":1350,"children":1351},{"style":272},[1352],{"type":52,"value":1353},"      burst",{"type":47,"tag":230,"props":1355,"children":1356},{"style":242},[1357],{"type":52,"value":280},{"type":47,"tag":230,"props":1359,"children":1360},{"style":317},[1361],{"type":52,"value":320},{"type":47,"tag":230,"props":1363,"children":1364},{"style":242},[1365],{"type":52,"value":412},{"type":47,"tag":230,"props":1367,"children":1368},{"style":439},[1369],{"type":52,"value":1370}," \u002F\u002F plus 5 immediate bursts\n",{"type":47,"tag":230,"props":1372,"children":1373},{"class":232,"line":435},[1374,1379,1383,1387,1392,1396],{"type":47,"tag":230,"props":1375,"children":1376},{"style":272},[1377],{"type":52,"value":1378},"      key",{"type":47,"tag":230,"props":1380,"children":1381},{"style":242},[1382],{"type":52,"value":280},{"type":47,"tag":230,"props":1384,"children":1385},{"style":242},[1386],{"type":52,"value":285},{"type":47,"tag":230,"props":1388,"children":1389},{"style":288},[1390],{"type":52,"value":1391},"event.data.customer_id",{"type":47,"tag":230,"props":1393,"children":1394},{"style":242},[1395],{"type":52,"value":296},{"type":47,"tag":230,"props":1397,"children":1398},{"style":439},[1399],{"type":52,"value":1400}," \u002F\u002F per customer\n",{"type":47,"tag":230,"props":1402,"children":1403},{"class":232,"line":445},[1404],{"type":47,"tag":230,"props":1405,"children":1406},{"style":242},[1407],{"type":52,"value":1408},"    },\n",{"type":47,"tag":230,"props":1410,"children":1411},{"class":232,"line":541},[1412,1416,1420,1424,1428,1432,1436,1440,1445,1449,1453],{"type":47,"tag":230,"props":1413,"children":1414},{"style":272},[1415],{"type":52,"value":332},{"type":47,"tag":230,"props":1417,"children":1418},{"style":242},[1419],{"type":52,"value":280},{"type":47,"tag":230,"props":1421,"children":1422},{"style":237},[1423],{"type":52,"value":341},{"type":47,"tag":230,"props":1425,"children":1426},{"style":242},[1427],{"type":52,"value":346},{"type":47,"tag":230,"props":1429,"children":1430},{"style":272},[1431],{"type":52,"value":351},{"type":47,"tag":230,"props":1433,"children":1434},{"style":242},[1435],{"type":52,"value":280},{"type":47,"tag":230,"props":1437,"children":1438},{"style":242},[1439],{"type":52,"value":285},{"type":47,"tag":230,"props":1441,"children":1442},{"style":288},[1443],{"type":52,"value":1444},"crm\u002Fcontact.updated",{"type":47,"tag":230,"props":1446,"children":1447},{"style":242},[1448],{"type":52,"value":296},{"type":47,"tag":230,"props":1450,"children":1451},{"style":242},[1452],{"type":52,"value":373},{"type":47,"tag":230,"props":1454,"children":1455},{"style":237},[1456],{"type":52,"value":378},{"type":47,"tag":230,"props":1458,"children":1459},{"class":232,"line":550},[1460],{"type":47,"tag":230,"props":1461,"children":1462},{"style":242},[1463],{"type":52,"value":387},{"type":47,"tag":230,"props":1465,"children":1466},{"class":232,"line":788},[1467,1471,1475,1479,1483,1487,1491,1495],{"type":47,"tag":230,"props":1468,"children":1469},{"style":394},[1470],{"type":52,"value":397},{"type":47,"tag":230,"props":1472,"children":1473},{"style":242},[1474],{"type":52,"value":402},{"type":47,"tag":230,"props":1476,"children":1477},{"style":405},[1478],{"type":52,"value":351},{"type":47,"tag":230,"props":1480,"children":1481},{"style":242},[1482],{"type":52,"value":412},{"type":47,"tag":230,"props":1484,"children":1485},{"style":405},[1486],{"type":52,"value":417},{"type":47,"tag":230,"props":1488,"children":1489},{"style":242},[1490],{"type":52,"value":422},{"type":47,"tag":230,"props":1492,"children":1493},{"style":394},[1494],{"type":52,"value":427},{"type":47,"tag":230,"props":1496,"children":1497},{"style":242},[1498],{"type":52,"value":432},{"type":47,"tag":230,"props":1500,"children":1501},{"class":232,"line":824},[1502],{"type":47,"tag":230,"props":1503,"children":1504},{"style":439},[1505],{"type":52,"value":1506},"    \u002F\u002F Respects CRM API rate limits: 10 calls\u002Fmin per customer\n",{"type":47,"tag":230,"props":1508,"children":1509},{"class":232,"line":833},[1510,1514,1518,1522,1526,1530,1534,1539,1543,1547,1551,1555,1560,1564,1569,1573,1577,1581,1585,1589],{"type":47,"tag":230,"props":1511,"children":1512},{"style":449},[1513],{"type":52,"value":452},{"type":47,"tag":230,"props":1515,"children":1516},{"style":237},[1517],{"type":52,"value":417},{"type":47,"tag":230,"props":1519,"children":1520},{"style":242},[1521],{"type":52,"value":245},{"type":47,"tag":230,"props":1523,"children":1524},{"style":248},[1525],{"type":52,"value":465},{"type":47,"tag":230,"props":1527,"children":1528},{"style":272},[1529],{"type":52,"value":470},{"type":47,"tag":230,"props":1531,"children":1532},{"style":242},[1533],{"type":52,"value":296},{"type":47,"tag":230,"props":1535,"children":1536},{"style":288},[1537],{"type":52,"value":1538},"sync",{"type":47,"tag":230,"props":1540,"children":1541},{"style":242},[1542],{"type":52,"value":296},{"type":47,"tag":230,"props":1544,"children":1545},{"style":242},[1546],{"type":52,"value":412},{"type":47,"tag":230,"props":1548,"children":1549},{"style":242},[1550],{"type":52,"value":492},{"type":47,"tag":230,"props":1552,"children":1553},{"style":394},[1554],{"type":52,"value":427},{"type":47,"tag":230,"props":1556,"children":1557},{"style":237},[1558],{"type":52,"value":1559}," crmApi",{"type":47,"tag":230,"props":1561,"children":1562},{"style":242},[1563],{"type":52,"value":245},{"type":47,"tag":230,"props":1565,"children":1566},{"style":248},[1567],{"type":52,"value":1568},"updateContact",{"type":47,"tag":230,"props":1570,"children":1571},{"style":272},[1572],{"type":52,"value":470},{"type":47,"tag":230,"props":1574,"children":1575},{"style":237},[1576],{"type":52,"value":510},{"type":47,"tag":230,"props":1578,"children":1579},{"style":242},[1580],{"type":52,"value":245},{"type":47,"tag":230,"props":1582,"children":1583},{"style":237},[1584],{"type":52,"value":519},{"type":47,"tag":230,"props":1586,"children":1587},{"style":272},[1588],{"type":52,"value":533},{"type":47,"tag":230,"props":1590,"children":1591},{"style":242},[1592],{"type":52,"value":538},{"type":47,"tag":230,"props":1594,"children":1595},{"class":232,"line":842},[1596],{"type":47,"tag":230,"props":1597,"children":1598},{"style":242},[1599],{"type":52,"value":547},{"type":47,"tag":230,"props":1601,"children":1602},{"class":232,"line":850},[1603,1607],{"type":47,"tag":230,"props":1604,"children":1605},{"style":237},[1606],{"type":52,"value":556},{"type":47,"tag":230,"props":1608,"children":1609},{"style":242},[1610],{"type":52,"value":538},{"type":47,"tag":55,"props":1612,"children":1613},{},[1614],{"type":47,"tag":68,"props":1615,"children":1616},{},[1617],{"type":52,"value":1618},"Configuration:",{"type":47,"tag":94,"props":1620,"children":1621},{},[1622,1633,1644,1655],{"type":47,"tag":98,"props":1623,"children":1624},{},[1625,1631],{"type":47,"tag":195,"props":1626,"children":1628},{"className":1627},[],[1629],{"type":52,"value":1630},"limit",{"type":52,"value":1632},": Functions that can start per period",{"type":47,"tag":98,"props":1634,"children":1635},{},[1636,1642],{"type":47,"tag":195,"props":1637,"children":1639},{"className":1638},[],[1640],{"type":52,"value":1641},"period",{"type":52,"value":1643},": Time window (1s to 7d)",{"type":47,"tag":98,"props":1645,"children":1646},{},[1647,1653],{"type":47,"tag":195,"props":1648,"children":1650},{"className":1649},[],[1651],{"type":52,"value":1652},"burst",{"type":52,"value":1654},": Extra immediate starts allowed",{"type":47,"tag":98,"props":1656,"children":1657},{},[1658,1663],{"type":47,"tag":195,"props":1659,"children":1661},{"className":1660},[],[1662],{"type":52,"value":577},{"type":52,"value":1664},": Apply limits per unique key value",{"type":47,"tag":87,"props":1666,"children":1668},{"id":1667},"rate-limiting",[1669],{"type":52,"value":1670},"Rate Limiting",{"type":47,"tag":55,"props":1672,"children":1673},{},[1674,1678],{"type":47,"tag":68,"props":1675,"children":1676},{},[1677],{"type":52,"value":181},{"type":52,"value":1679}," Hard limit to prevent abuse or skip excessive duplicate events.",{"type":47,"tag":55,"props":1681,"children":1682},{},[1683,1688],{"type":47,"tag":68,"props":1684,"children":1685},{},[1686],{"type":52,"value":1687},"Key difference from throttling:",{"type":52,"value":1689}," Rate limiting discards events; throttling delays them.",{"type":47,"tag":219,"props":1691,"children":1693},{"className":221,"code":1692,"language":223,"meta":224,"style":224},"inngest.createFunction(\n  {\n    id: \"webhook-processor\",\n    rateLimit: {\n      limit: 1,\n      period: \"4h\",\n      key: \"event.data.webhook_id\"\n    },\n    triggers: [{ event: \"webhook\u002Fdata.received\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Process each webhook only once per 4 hours\n    \u002F\u002F Prevents duplicate webhook spam\n  }\n);\n",[1694],{"type":47,"tag":195,"props":1695,"children":1696},{"__ignoreMap":224},[1697,1716,1723,1751,1767,1787,1815,1840,1847,1895,1902,1937,1945,1953,1960],{"type":47,"tag":230,"props":1698,"children":1699},{"class":232,"line":233},[1700,1704,1708,1712],{"type":47,"tag":230,"props":1701,"children":1702},{"style":237},[1703],{"type":52,"value":8},{"type":47,"tag":230,"props":1705,"children":1706},{"style":242},[1707],{"type":52,"value":245},{"type":47,"tag":230,"props":1709,"children":1710},{"style":248},[1711],{"type":52,"value":251},{"type":47,"tag":230,"props":1713,"children":1714},{"style":237},[1715],{"type":52,"value":256},{"type":47,"tag":230,"props":1717,"children":1718},{"class":232,"line":259},[1719],{"type":47,"tag":230,"props":1720,"children":1721},{"style":242},[1722],{"type":52,"value":265},{"type":47,"tag":230,"props":1724,"children":1725},{"class":232,"line":268},[1726,1730,1734,1738,1743,1747],{"type":47,"tag":230,"props":1727,"children":1728},{"style":272},[1729],{"type":52,"value":275},{"type":47,"tag":230,"props":1731,"children":1732},{"style":242},[1733],{"type":52,"value":280},{"type":47,"tag":230,"props":1735,"children":1736},{"style":242},[1737],{"type":52,"value":285},{"type":47,"tag":230,"props":1739,"children":1740},{"style":288},[1741],{"type":52,"value":1742},"webhook-processor",{"type":47,"tag":230,"props":1744,"children":1745},{"style":242},[1746],{"type":52,"value":296},{"type":47,"tag":230,"props":1748,"children":1749},{"style":242},[1750],{"type":52,"value":301},{"type":47,"tag":230,"props":1752,"children":1753},{"class":232,"line":304},[1754,1759,1763],{"type":47,"tag":230,"props":1755,"children":1756},{"style":272},[1757],{"type":52,"value":1758},"    rateLimit",{"type":47,"tag":230,"props":1760,"children":1761},{"style":242},[1762],{"type":52,"value":280},{"type":47,"tag":230,"props":1764,"children":1765},{"style":242},[1766],{"type":52,"value":432},{"type":47,"tag":230,"props":1768,"children":1769},{"class":232,"line":27},[1770,1774,1778,1783],{"type":47,"tag":230,"props":1771,"children":1772},{"style":272},[1773],{"type":52,"value":1293},{"type":47,"tag":230,"props":1775,"children":1776},{"style":242},[1777],{"type":52,"value":280},{"type":47,"tag":230,"props":1779,"children":1780},{"style":317},[1781],{"type":52,"value":1782}," 1",{"type":47,"tag":230,"props":1784,"children":1785},{"style":242},[1786],{"type":52,"value":301},{"type":47,"tag":230,"props":1788,"children":1789},{"class":232,"line":381},[1790,1794,1798,1802,1807,1811],{"type":47,"tag":230,"props":1791,"children":1792},{"style":272},[1793],{"type":52,"value":1319},{"type":47,"tag":230,"props":1795,"children":1796},{"style":242},[1797],{"type":52,"value":280},{"type":47,"tag":230,"props":1799,"children":1800},{"style":242},[1801],{"type":52,"value":285},{"type":47,"tag":230,"props":1803,"children":1804},{"style":288},[1805],{"type":52,"value":1806},"4h",{"type":47,"tag":230,"props":1808,"children":1809},{"style":242},[1810],{"type":52,"value":296},{"type":47,"tag":230,"props":1812,"children":1813},{"style":242},[1814],{"type":52,"value":301},{"type":47,"tag":230,"props":1816,"children":1817},{"class":232,"line":390},[1818,1822,1826,1830,1835],{"type":47,"tag":230,"props":1819,"children":1820},{"style":272},[1821],{"type":52,"value":1378},{"type":47,"tag":230,"props":1823,"children":1824},{"style":242},[1825],{"type":52,"value":280},{"type":47,"tag":230,"props":1827,"children":1828},{"style":242},[1829],{"type":52,"value":285},{"type":47,"tag":230,"props":1831,"children":1832},{"style":288},[1833],{"type":52,"value":1834},"event.data.webhook_id",{"type":47,"tag":230,"props":1836,"children":1837},{"style":242},[1838],{"type":52,"value":1839},"\"\n",{"type":47,"tag":230,"props":1841,"children":1842},{"class":232,"line":435},[1843],{"type":47,"tag":230,"props":1844,"children":1845},{"style":242},[1846],{"type":52,"value":1408},{"type":47,"tag":230,"props":1848,"children":1849},{"class":232,"line":445},[1850,1854,1858,1862,1866,1870,1874,1878,1883,1887,1891],{"type":47,"tag":230,"props":1851,"children":1852},{"style":272},[1853],{"type":52,"value":332},{"type":47,"tag":230,"props":1855,"children":1856},{"style":242},[1857],{"type":52,"value":280},{"type":47,"tag":230,"props":1859,"children":1860},{"style":237},[1861],{"type":52,"value":341},{"type":47,"tag":230,"props":1863,"children":1864},{"style":242},[1865],{"type":52,"value":346},{"type":47,"tag":230,"props":1867,"children":1868},{"style":272},[1869],{"type":52,"value":351},{"type":47,"tag":230,"props":1871,"children":1872},{"style":242},[1873],{"type":52,"value":280},{"type":47,"tag":230,"props":1875,"children":1876},{"style":242},[1877],{"type":52,"value":285},{"type":47,"tag":230,"props":1879,"children":1880},{"style":288},[1881],{"type":52,"value":1882},"webhook\u002Fdata.received",{"type":47,"tag":230,"props":1884,"children":1885},{"style":242},[1886],{"type":52,"value":296},{"type":47,"tag":230,"props":1888,"children":1889},{"style":242},[1890],{"type":52,"value":373},{"type":47,"tag":230,"props":1892,"children":1893},{"style":237},[1894],{"type":52,"value":378},{"type":47,"tag":230,"props":1896,"children":1897},{"class":232,"line":541},[1898],{"type":47,"tag":230,"props":1899,"children":1900},{"style":242},[1901],{"type":52,"value":387},{"type":47,"tag":230,"props":1903,"children":1904},{"class":232,"line":550},[1905,1909,1913,1917,1921,1925,1929,1933],{"type":47,"tag":230,"props":1906,"children":1907},{"style":394},[1908],{"type":52,"value":397},{"type":47,"tag":230,"props":1910,"children":1911},{"style":242},[1912],{"type":52,"value":402},{"type":47,"tag":230,"props":1914,"children":1915},{"style":405},[1916],{"type":52,"value":351},{"type":47,"tag":230,"props":1918,"children":1919},{"style":242},[1920],{"type":52,"value":412},{"type":47,"tag":230,"props":1922,"children":1923},{"style":405},[1924],{"type":52,"value":417},{"type":47,"tag":230,"props":1926,"children":1927},{"style":242},[1928],{"type":52,"value":422},{"type":47,"tag":230,"props":1930,"children":1931},{"style":394},[1932],{"type":52,"value":427},{"type":47,"tag":230,"props":1934,"children":1935},{"style":242},[1936],{"type":52,"value":432},{"type":47,"tag":230,"props":1938,"children":1939},{"class":232,"line":788},[1940],{"type":47,"tag":230,"props":1941,"children":1942},{"style":439},[1943],{"type":52,"value":1944},"    \u002F\u002F Process each webhook only once per 4 hours\n",{"type":47,"tag":230,"props":1946,"children":1947},{"class":232,"line":824},[1948],{"type":47,"tag":230,"props":1949,"children":1950},{"style":439},[1951],{"type":52,"value":1952},"    \u002F\u002F Prevents duplicate webhook spam\n",{"type":47,"tag":230,"props":1954,"children":1955},{"class":232,"line":833},[1956],{"type":47,"tag":230,"props":1957,"children":1958},{"style":242},[1959],{"type":52,"value":547},{"type":47,"tag":230,"props":1961,"children":1962},{"class":232,"line":842},[1963,1967],{"type":47,"tag":230,"props":1964,"children":1965},{"style":237},[1966],{"type":52,"value":556},{"type":47,"tag":230,"props":1968,"children":1969},{"style":242},[1970],{"type":52,"value":538},{"type":47,"tag":55,"props":1972,"children":1973},{},[1974],{"type":47,"tag":68,"props":1975,"children":1976},{},[1977],{"type":52,"value":1978},"Use cases:",{"type":47,"tag":94,"props":1980,"children":1981},{},[1982,1987,1992],{"type":47,"tag":98,"props":1983,"children":1984},{},[1985],{"type":52,"value":1986},"Prevent webhook duplicates",{"type":47,"tag":98,"props":1988,"children":1989},{},[1990],{"type":52,"value":1991},"Limit expensive operations per user",{"type":47,"tag":98,"props":1993,"children":1994},{},[1995],{"type":52,"value":1996},"Protection against abuse",{"type":47,"tag":87,"props":1998,"children":2000},{"id":1999},"debounce",[2001],{"type":52,"value":2002},"Debounce",{"type":47,"tag":55,"props":2004,"children":2005},{},[2006,2010],{"type":47,"tag":68,"props":2007,"children":2008},{},[2009],{"type":52,"value":181},{"type":52,"value":2011}," Wait for a series of events to stop arriving before processing the latest one.",{"type":47,"tag":219,"props":2013,"children":2015},{"className":221,"code":2014,"language":223,"meta":224,"style":224},"inngest.createFunction(\n  {\n    id: \"save-document\",\n    debounce: {\n      period: \"5m\", \u002F\u002F Wait 5min after last edit\n      key: \"event.data.document_id\",\n      timeout: \"30m\" \u002F\u002F Force save after 30min max\n    },\n    triggers: [{ event: \"document\u002Fcontent.changed\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Saves document only after user stops editing\n    \u002F\u002F Uses the LAST event received\n    await step.run(\"save\", () => saveDocument(event.data));\n  }\n);\n",[2016],{"type":47,"tag":195,"props":2017,"children":2018},{"__ignoreMap":224},[2019,2038,2045,2073,2089,2122,2150,2180,2187,2235,2242,2277,2285,2293,2370,2377],{"type":47,"tag":230,"props":2020,"children":2021},{"class":232,"line":233},[2022,2026,2030,2034],{"type":47,"tag":230,"props":2023,"children":2024},{"style":237},[2025],{"type":52,"value":8},{"type":47,"tag":230,"props":2027,"children":2028},{"style":242},[2029],{"type":52,"value":245},{"type":47,"tag":230,"props":2031,"children":2032},{"style":248},[2033],{"type":52,"value":251},{"type":47,"tag":230,"props":2035,"children":2036},{"style":237},[2037],{"type":52,"value":256},{"type":47,"tag":230,"props":2039,"children":2040},{"class":232,"line":259},[2041],{"type":47,"tag":230,"props":2042,"children":2043},{"style":242},[2044],{"type":52,"value":265},{"type":47,"tag":230,"props":2046,"children":2047},{"class":232,"line":268},[2048,2052,2056,2060,2065,2069],{"type":47,"tag":230,"props":2049,"children":2050},{"style":272},[2051],{"type":52,"value":275},{"type":47,"tag":230,"props":2053,"children":2054},{"style":242},[2055],{"type":52,"value":280},{"type":47,"tag":230,"props":2057,"children":2058},{"style":242},[2059],{"type":52,"value":285},{"type":47,"tag":230,"props":2061,"children":2062},{"style":288},[2063],{"type":52,"value":2064},"save-document",{"type":47,"tag":230,"props":2066,"children":2067},{"style":242},[2068],{"type":52,"value":296},{"type":47,"tag":230,"props":2070,"children":2071},{"style":242},[2072],{"type":52,"value":301},{"type":47,"tag":230,"props":2074,"children":2075},{"class":232,"line":304},[2076,2081,2085],{"type":47,"tag":230,"props":2077,"children":2078},{"style":272},[2079],{"type":52,"value":2080},"    debounce",{"type":47,"tag":230,"props":2082,"children":2083},{"style":242},[2084],{"type":52,"value":280},{"type":47,"tag":230,"props":2086,"children":2087},{"style":242},[2088],{"type":52,"value":432},{"type":47,"tag":230,"props":2090,"children":2091},{"class":232,"line":27},[2092,2096,2100,2104,2109,2113,2117],{"type":47,"tag":230,"props":2093,"children":2094},{"style":272},[2095],{"type":52,"value":1319},{"type":47,"tag":230,"props":2097,"children":2098},{"style":242},[2099],{"type":52,"value":280},{"type":47,"tag":230,"props":2101,"children":2102},{"style":242},[2103],{"type":52,"value":285},{"type":47,"tag":230,"props":2105,"children":2106},{"style":288},[2107],{"type":52,"value":2108},"5m",{"type":47,"tag":230,"props":2110,"children":2111},{"style":242},[2112],{"type":52,"value":296},{"type":47,"tag":230,"props":2114,"children":2115},{"style":242},[2116],{"type":52,"value":412},{"type":47,"tag":230,"props":2118,"children":2119},{"style":439},[2120],{"type":52,"value":2121}," \u002F\u002F Wait 5min after last edit\n",{"type":47,"tag":230,"props":2123,"children":2124},{"class":232,"line":381},[2125,2129,2133,2137,2142,2146],{"type":47,"tag":230,"props":2126,"children":2127},{"style":272},[2128],{"type":52,"value":1378},{"type":47,"tag":230,"props":2130,"children":2131},{"style":242},[2132],{"type":52,"value":280},{"type":47,"tag":230,"props":2134,"children":2135},{"style":242},[2136],{"type":52,"value":285},{"type":47,"tag":230,"props":2138,"children":2139},{"style":288},[2140],{"type":52,"value":2141},"event.data.document_id",{"type":47,"tag":230,"props":2143,"children":2144},{"style":242},[2145],{"type":52,"value":296},{"type":47,"tag":230,"props":2147,"children":2148},{"style":242},[2149],{"type":52,"value":301},{"type":47,"tag":230,"props":2151,"children":2152},{"class":232,"line":390},[2153,2158,2162,2166,2171,2175],{"type":47,"tag":230,"props":2154,"children":2155},{"style":272},[2156],{"type":52,"value":2157},"      timeout",{"type":47,"tag":230,"props":2159,"children":2160},{"style":242},[2161],{"type":52,"value":280},{"type":47,"tag":230,"props":2163,"children":2164},{"style":242},[2165],{"type":52,"value":285},{"type":47,"tag":230,"props":2167,"children":2168},{"style":288},[2169],{"type":52,"value":2170},"30m",{"type":47,"tag":230,"props":2172,"children":2173},{"style":242},[2174],{"type":52,"value":296},{"type":47,"tag":230,"props":2176,"children":2177},{"style":439},[2178],{"type":52,"value":2179}," \u002F\u002F Force save after 30min max\n",{"type":47,"tag":230,"props":2181,"children":2182},{"class":232,"line":435},[2183],{"type":47,"tag":230,"props":2184,"children":2185},{"style":242},[2186],{"type":52,"value":1408},{"type":47,"tag":230,"props":2188,"children":2189},{"class":232,"line":445},[2190,2194,2198,2202,2206,2210,2214,2218,2223,2227,2231],{"type":47,"tag":230,"props":2191,"children":2192},{"style":272},[2193],{"type":52,"value":332},{"type":47,"tag":230,"props":2195,"children":2196},{"style":242},[2197],{"type":52,"value":280},{"type":47,"tag":230,"props":2199,"children":2200},{"style":237},[2201],{"type":52,"value":341},{"type":47,"tag":230,"props":2203,"children":2204},{"style":242},[2205],{"type":52,"value":346},{"type":47,"tag":230,"props":2207,"children":2208},{"style":272},[2209],{"type":52,"value":351},{"type":47,"tag":230,"props":2211,"children":2212},{"style":242},[2213],{"type":52,"value":280},{"type":47,"tag":230,"props":2215,"children":2216},{"style":242},[2217],{"type":52,"value":285},{"type":47,"tag":230,"props":2219,"children":2220},{"style":288},[2221],{"type":52,"value":2222},"document\u002Fcontent.changed",{"type":47,"tag":230,"props":2224,"children":2225},{"style":242},[2226],{"type":52,"value":296},{"type":47,"tag":230,"props":2228,"children":2229},{"style":242},[2230],{"type":52,"value":373},{"type":47,"tag":230,"props":2232,"children":2233},{"style":237},[2234],{"type":52,"value":378},{"type":47,"tag":230,"props":2236,"children":2237},{"class":232,"line":541},[2238],{"type":47,"tag":230,"props":2239,"children":2240},{"style":242},[2241],{"type":52,"value":387},{"type":47,"tag":230,"props":2243,"children":2244},{"class":232,"line":550},[2245,2249,2253,2257,2261,2265,2269,2273],{"type":47,"tag":230,"props":2246,"children":2247},{"style":394},[2248],{"type":52,"value":397},{"type":47,"tag":230,"props":2250,"children":2251},{"style":242},[2252],{"type":52,"value":402},{"type":47,"tag":230,"props":2254,"children":2255},{"style":405},[2256],{"type":52,"value":351},{"type":47,"tag":230,"props":2258,"children":2259},{"style":242},[2260],{"type":52,"value":412},{"type":47,"tag":230,"props":2262,"children":2263},{"style":405},[2264],{"type":52,"value":417},{"type":47,"tag":230,"props":2266,"children":2267},{"style":242},[2268],{"type":52,"value":422},{"type":47,"tag":230,"props":2270,"children":2271},{"style":394},[2272],{"type":52,"value":427},{"type":47,"tag":230,"props":2274,"children":2275},{"style":242},[2276],{"type":52,"value":432},{"type":47,"tag":230,"props":2278,"children":2279},{"class":232,"line":788},[2280],{"type":47,"tag":230,"props":2281,"children":2282},{"style":439},[2283],{"type":52,"value":2284},"    \u002F\u002F Saves document only after user stops editing\n",{"type":47,"tag":230,"props":2286,"children":2287},{"class":232,"line":824},[2288],{"type":47,"tag":230,"props":2289,"children":2290},{"style":439},[2291],{"type":52,"value":2292},"    \u002F\u002F Uses the LAST event received\n",{"type":47,"tag":230,"props":2294,"children":2295},{"class":232,"line":833},[2296,2300,2304,2308,2312,2316,2320,2325,2329,2333,2337,2341,2346,2350,2354,2358,2362,2366],{"type":47,"tag":230,"props":2297,"children":2298},{"style":449},[2299],{"type":52,"value":452},{"type":47,"tag":230,"props":2301,"children":2302},{"style":237},[2303],{"type":52,"value":417},{"type":47,"tag":230,"props":2305,"children":2306},{"style":242},[2307],{"type":52,"value":245},{"type":47,"tag":230,"props":2309,"children":2310},{"style":248},[2311],{"type":52,"value":465},{"type":47,"tag":230,"props":2313,"children":2314},{"style":272},[2315],{"type":52,"value":470},{"type":47,"tag":230,"props":2317,"children":2318},{"style":242},[2319],{"type":52,"value":296},{"type":47,"tag":230,"props":2321,"children":2322},{"style":288},[2323],{"type":52,"value":2324},"save",{"type":47,"tag":230,"props":2326,"children":2327},{"style":242},[2328],{"type":52,"value":296},{"type":47,"tag":230,"props":2330,"children":2331},{"style":242},[2332],{"type":52,"value":412},{"type":47,"tag":230,"props":2334,"children":2335},{"style":242},[2336],{"type":52,"value":492},{"type":47,"tag":230,"props":2338,"children":2339},{"style":394},[2340],{"type":52,"value":427},{"type":47,"tag":230,"props":2342,"children":2343},{"style":248},[2344],{"type":52,"value":2345}," saveDocument",{"type":47,"tag":230,"props":2347,"children":2348},{"style":272},[2349],{"type":52,"value":470},{"type":47,"tag":230,"props":2351,"children":2352},{"style":237},[2353],{"type":52,"value":510},{"type":47,"tag":230,"props":2355,"children":2356},{"style":242},[2357],{"type":52,"value":245},{"type":47,"tag":230,"props":2359,"children":2360},{"style":237},[2361],{"type":52,"value":519},{"type":47,"tag":230,"props":2363,"children":2364},{"style":272},[2365],{"type":52,"value":533},{"type":47,"tag":230,"props":2367,"children":2368},{"style":242},[2369],{"type":52,"value":538},{"type":47,"tag":230,"props":2371,"children":2372},{"class":232,"line":842},[2373],{"type":47,"tag":230,"props":2374,"children":2375},{"style":242},[2376],{"type":52,"value":547},{"type":47,"tag":230,"props":2378,"children":2379},{"class":232,"line":850},[2380,2384],{"type":47,"tag":230,"props":2381,"children":2382},{"style":237},[2383],{"type":52,"value":556},{"type":47,"tag":230,"props":2385,"children":2386},{"style":242},[2387],{"type":52,"value":538},{"type":47,"tag":55,"props":2389,"children":2390},{},[2391],{"type":47,"tag":68,"props":2392,"children":2393},{},[2394],{"type":52,"value":2395},"Perfect for:",{"type":47,"tag":94,"props":2397,"children":2398},{},[2399,2404,2409],{"type":47,"tag":98,"props":2400,"children":2401},{},[2402],{"type":52,"value":2403},"User input that changes rapidly (search, document editing)",{"type":47,"tag":98,"props":2405,"children":2406},{},[2407],{"type":52,"value":2408},"Noisy webhook events",{"type":47,"tag":98,"props":2410,"children":2411},{},[2412],{"type":52,"value":2413},"Ensuring latest data is processed",{"type":47,"tag":87,"props":2415,"children":2417},{"id":2416},"priority",[2418],{"type":52,"value":2419},"Priority",{"type":47,"tag":55,"props":2421,"children":2422},{},[2423,2427],{"type":47,"tag":68,"props":2424,"children":2425},{},[2426],{"type":52,"value":181},{"type":52,"value":2428}," Execute some function runs ahead of others based on dynamic data.",{"type":47,"tag":219,"props":2430,"children":2432},{"className":221,"code":2431,"language":223,"meta":224,"style":224},"inngest.createFunction(\n  {\n    id: \"process-order\",\n    priority: {\n      \u002F\u002F VIP users get priority up to 120 seconds ahead\n      run: \"event.data.user_tier == 'vip' ? 120 : 0\"\n    },\n    triggers: [{ event: \"order\u002Fplaced\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F VIP orders jump ahead in the queue\n  }\n);\n",[2433],{"type":47,"tag":195,"props":2434,"children":2435},{"__ignoreMap":224},[2436,2455,2462,2490,2506,2514,2539,2546,2594,2601,2636,2644,2651],{"type":47,"tag":230,"props":2437,"children":2438},{"class":232,"line":233},[2439,2443,2447,2451],{"type":47,"tag":230,"props":2440,"children":2441},{"style":237},[2442],{"type":52,"value":8},{"type":47,"tag":230,"props":2444,"children":2445},{"style":242},[2446],{"type":52,"value":245},{"type":47,"tag":230,"props":2448,"children":2449},{"style":248},[2450],{"type":52,"value":251},{"type":47,"tag":230,"props":2452,"children":2453},{"style":237},[2454],{"type":52,"value":256},{"type":47,"tag":230,"props":2456,"children":2457},{"class":232,"line":259},[2458],{"type":47,"tag":230,"props":2459,"children":2460},{"style":242},[2461],{"type":52,"value":265},{"type":47,"tag":230,"props":2463,"children":2464},{"class":232,"line":268},[2465,2469,2473,2477,2482,2486],{"type":47,"tag":230,"props":2466,"children":2467},{"style":272},[2468],{"type":52,"value":275},{"type":47,"tag":230,"props":2470,"children":2471},{"style":242},[2472],{"type":52,"value":280},{"type":47,"tag":230,"props":2474,"children":2475},{"style":242},[2476],{"type":52,"value":285},{"type":47,"tag":230,"props":2478,"children":2479},{"style":288},[2480],{"type":52,"value":2481},"process-order",{"type":47,"tag":230,"props":2483,"children":2484},{"style":242},[2485],{"type":52,"value":296},{"type":47,"tag":230,"props":2487,"children":2488},{"style":242},[2489],{"type":52,"value":301},{"type":47,"tag":230,"props":2491,"children":2492},{"class":232,"line":304},[2493,2498,2502],{"type":47,"tag":230,"props":2494,"children":2495},{"style":272},[2496],{"type":52,"value":2497},"    priority",{"type":47,"tag":230,"props":2499,"children":2500},{"style":242},[2501],{"type":52,"value":280},{"type":47,"tag":230,"props":2503,"children":2504},{"style":242},[2505],{"type":52,"value":432},{"type":47,"tag":230,"props":2507,"children":2508},{"class":232,"line":27},[2509],{"type":47,"tag":230,"props":2510,"children":2511},{"style":439},[2512],{"type":52,"value":2513},"      \u002F\u002F VIP users get priority up to 120 seconds ahead\n",{"type":47,"tag":230,"props":2515,"children":2516},{"class":232,"line":381},[2517,2522,2526,2530,2535],{"type":47,"tag":230,"props":2518,"children":2519},{"style":272},[2520],{"type":52,"value":2521},"      run",{"type":47,"tag":230,"props":2523,"children":2524},{"style":242},[2525],{"type":52,"value":280},{"type":47,"tag":230,"props":2527,"children":2528},{"style":242},[2529],{"type":52,"value":285},{"type":47,"tag":230,"props":2531,"children":2532},{"style":288},[2533],{"type":52,"value":2534},"event.data.user_tier == 'vip' ? 120 : 0",{"type":47,"tag":230,"props":2536,"children":2537},{"style":242},[2538],{"type":52,"value":1839},{"type":47,"tag":230,"props":2540,"children":2541},{"class":232,"line":390},[2542],{"type":47,"tag":230,"props":2543,"children":2544},{"style":242},[2545],{"type":52,"value":1408},{"type":47,"tag":230,"props":2547,"children":2548},{"class":232,"line":435},[2549,2553,2557,2561,2565,2569,2573,2577,2582,2586,2590],{"type":47,"tag":230,"props":2550,"children":2551},{"style":272},[2552],{"type":52,"value":332},{"type":47,"tag":230,"props":2554,"children":2555},{"style":242},[2556],{"type":52,"value":280},{"type":47,"tag":230,"props":2558,"children":2559},{"style":237},[2560],{"type":52,"value":341},{"type":47,"tag":230,"props":2562,"children":2563},{"style":242},[2564],{"type":52,"value":346},{"type":47,"tag":230,"props":2566,"children":2567},{"style":272},[2568],{"type":52,"value":351},{"type":47,"tag":230,"props":2570,"children":2571},{"style":242},[2572],{"type":52,"value":280},{"type":47,"tag":230,"props":2574,"children":2575},{"style":242},[2576],{"type":52,"value":285},{"type":47,"tag":230,"props":2578,"children":2579},{"style":288},[2580],{"type":52,"value":2581},"order\u002Fplaced",{"type":47,"tag":230,"props":2583,"children":2584},{"style":242},[2585],{"type":52,"value":296},{"type":47,"tag":230,"props":2587,"children":2588},{"style":242},[2589],{"type":52,"value":373},{"type":47,"tag":230,"props":2591,"children":2592},{"style":237},[2593],{"type":52,"value":378},{"type":47,"tag":230,"props":2595,"children":2596},{"class":232,"line":445},[2597],{"type":47,"tag":230,"props":2598,"children":2599},{"style":242},[2600],{"type":52,"value":387},{"type":47,"tag":230,"props":2602,"children":2603},{"class":232,"line":541},[2604,2608,2612,2616,2620,2624,2628,2632],{"type":47,"tag":230,"props":2605,"children":2606},{"style":394},[2607],{"type":52,"value":397},{"type":47,"tag":230,"props":2609,"children":2610},{"style":242},[2611],{"type":52,"value":402},{"type":47,"tag":230,"props":2613,"children":2614},{"style":405},[2615],{"type":52,"value":351},{"type":47,"tag":230,"props":2617,"children":2618},{"style":242},[2619],{"type":52,"value":412},{"type":47,"tag":230,"props":2621,"children":2622},{"style":405},[2623],{"type":52,"value":417},{"type":47,"tag":230,"props":2625,"children":2626},{"style":242},[2627],{"type":52,"value":422},{"type":47,"tag":230,"props":2629,"children":2630},{"style":394},[2631],{"type":52,"value":427},{"type":47,"tag":230,"props":2633,"children":2634},{"style":242},[2635],{"type":52,"value":432},{"type":47,"tag":230,"props":2637,"children":2638},{"class":232,"line":550},[2639],{"type":47,"tag":230,"props":2640,"children":2641},{"style":439},[2642],{"type":52,"value":2643},"    \u002F\u002F VIP orders jump ahead in the queue\n",{"type":47,"tag":230,"props":2645,"children":2646},{"class":232,"line":788},[2647],{"type":47,"tag":230,"props":2648,"children":2649},{"style":242},[2650],{"type":52,"value":547},{"type":47,"tag":230,"props":2652,"children":2653},{"class":232,"line":824},[2654,2658],{"type":47,"tag":230,"props":2655,"children":2656},{"style":237},[2657],{"type":52,"value":556},{"type":47,"tag":230,"props":2659,"children":2660},{"style":242},[2661],{"type":52,"value":538},{"type":47,"tag":55,"props":2663,"children":2664},{},[2665],{"type":47,"tag":68,"props":2666,"children":2667},{},[2668],{"type":52,"value":2669},"Advanced example:",{"type":47,"tag":219,"props":2671,"children":2673},{"className":221,"code":2672,"language":223,"meta":224,"style":224},"inngest.createFunction(\n  {\n    id: \"support-ticket\",\n    priority: {\n      run: `\n        event.data.severity == 'critical' ? 300 :\n        event.data.severity == 'high' ? 120 :\n        event.data.user_plan == 'enterprise' ? 60 : 0\n      `\n    },\n    triggers: [{ event: \"support\u002Fticket.created\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Critical tickets get highest priority (300s ahead)\n    \u002F\u002F High severity: 120s ahead\n    \u002F\u002F Enterprise users: 60s ahead\n    \u002F\u002F Everyone else: normal priority\n  }\n);\n",[2674],{"type":47,"tag":195,"props":2675,"children":2676},{"__ignoreMap":224},[2677,2696,2703,2731,2746,2762,2770,2778,2786,2794,2801,2849,2856,2891,2899,2907,2915,2924,2932],{"type":47,"tag":230,"props":2678,"children":2679},{"class":232,"line":233},[2680,2684,2688,2692],{"type":47,"tag":230,"props":2681,"children":2682},{"style":237},[2683],{"type":52,"value":8},{"type":47,"tag":230,"props":2685,"children":2686},{"style":242},[2687],{"type":52,"value":245},{"type":47,"tag":230,"props":2689,"children":2690},{"style":248},[2691],{"type":52,"value":251},{"type":47,"tag":230,"props":2693,"children":2694},{"style":237},[2695],{"type":52,"value":256},{"type":47,"tag":230,"props":2697,"children":2698},{"class":232,"line":259},[2699],{"type":47,"tag":230,"props":2700,"children":2701},{"style":242},[2702],{"type":52,"value":265},{"type":47,"tag":230,"props":2704,"children":2705},{"class":232,"line":268},[2706,2710,2714,2718,2723,2727],{"type":47,"tag":230,"props":2707,"children":2708},{"style":272},[2709],{"type":52,"value":275},{"type":47,"tag":230,"props":2711,"children":2712},{"style":242},[2713],{"type":52,"value":280},{"type":47,"tag":230,"props":2715,"children":2716},{"style":242},[2717],{"type":52,"value":285},{"type":47,"tag":230,"props":2719,"children":2720},{"style":288},[2721],{"type":52,"value":2722},"support-ticket",{"type":47,"tag":230,"props":2724,"children":2725},{"style":242},[2726],{"type":52,"value":296},{"type":47,"tag":230,"props":2728,"children":2729},{"style":242},[2730],{"type":52,"value":301},{"type":47,"tag":230,"props":2732,"children":2733},{"class":232,"line":304},[2734,2738,2742],{"type":47,"tag":230,"props":2735,"children":2736},{"style":272},[2737],{"type":52,"value":2497},{"type":47,"tag":230,"props":2739,"children":2740},{"style":242},[2741],{"type":52,"value":280},{"type":47,"tag":230,"props":2743,"children":2744},{"style":242},[2745],{"type":52,"value":432},{"type":47,"tag":230,"props":2747,"children":2748},{"class":232,"line":27},[2749,2753,2757],{"type":47,"tag":230,"props":2750,"children":2751},{"style":272},[2752],{"type":52,"value":2521},{"type":47,"tag":230,"props":2754,"children":2755},{"style":242},[2756],{"type":52,"value":280},{"type":47,"tag":230,"props":2758,"children":2759},{"style":242},[2760],{"type":52,"value":2761}," `\n",{"type":47,"tag":230,"props":2763,"children":2764},{"class":232,"line":381},[2765],{"type":47,"tag":230,"props":2766,"children":2767},{"style":288},[2768],{"type":52,"value":2769},"        event.data.severity == 'critical' ? 300 :\n",{"type":47,"tag":230,"props":2771,"children":2772},{"class":232,"line":390},[2773],{"type":47,"tag":230,"props":2774,"children":2775},{"style":288},[2776],{"type":52,"value":2777},"        event.data.severity == 'high' ? 120 :\n",{"type":47,"tag":230,"props":2779,"children":2780},{"class":232,"line":435},[2781],{"type":47,"tag":230,"props":2782,"children":2783},{"style":288},[2784],{"type":52,"value":2785},"        event.data.user_plan == 'enterprise' ? 60 : 0\n",{"type":47,"tag":230,"props":2787,"children":2788},{"class":232,"line":445},[2789],{"type":47,"tag":230,"props":2790,"children":2791},{"style":242},[2792],{"type":52,"value":2793},"      `\n",{"type":47,"tag":230,"props":2795,"children":2796},{"class":232,"line":541},[2797],{"type":47,"tag":230,"props":2798,"children":2799},{"style":242},[2800],{"type":52,"value":1408},{"type":47,"tag":230,"props":2802,"children":2803},{"class":232,"line":550},[2804,2808,2812,2816,2820,2824,2828,2832,2837,2841,2845],{"type":47,"tag":230,"props":2805,"children":2806},{"style":272},[2807],{"type":52,"value":332},{"type":47,"tag":230,"props":2809,"children":2810},{"style":242},[2811],{"type":52,"value":280},{"type":47,"tag":230,"props":2813,"children":2814},{"style":237},[2815],{"type":52,"value":341},{"type":47,"tag":230,"props":2817,"children":2818},{"style":242},[2819],{"type":52,"value":346},{"type":47,"tag":230,"props":2821,"children":2822},{"style":272},[2823],{"type":52,"value":351},{"type":47,"tag":230,"props":2825,"children":2826},{"style":242},[2827],{"type":52,"value":280},{"type":47,"tag":230,"props":2829,"children":2830},{"style":242},[2831],{"type":52,"value":285},{"type":47,"tag":230,"props":2833,"children":2834},{"style":288},[2835],{"type":52,"value":2836},"support\u002Fticket.created",{"type":47,"tag":230,"props":2838,"children":2839},{"style":242},[2840],{"type":52,"value":296},{"type":47,"tag":230,"props":2842,"children":2843},{"style":242},[2844],{"type":52,"value":373},{"type":47,"tag":230,"props":2846,"children":2847},{"style":237},[2848],{"type":52,"value":378},{"type":47,"tag":230,"props":2850,"children":2851},{"class":232,"line":788},[2852],{"type":47,"tag":230,"props":2853,"children":2854},{"style":242},[2855],{"type":52,"value":387},{"type":47,"tag":230,"props":2857,"children":2858},{"class":232,"line":824},[2859,2863,2867,2871,2875,2879,2883,2887],{"type":47,"tag":230,"props":2860,"children":2861},{"style":394},[2862],{"type":52,"value":397},{"type":47,"tag":230,"props":2864,"children":2865},{"style":242},[2866],{"type":52,"value":402},{"type":47,"tag":230,"props":2868,"children":2869},{"style":405},[2870],{"type":52,"value":351},{"type":47,"tag":230,"props":2872,"children":2873},{"style":242},[2874],{"type":52,"value":412},{"type":47,"tag":230,"props":2876,"children":2877},{"style":405},[2878],{"type":52,"value":417},{"type":47,"tag":230,"props":2880,"children":2881},{"style":242},[2882],{"type":52,"value":422},{"type":47,"tag":230,"props":2884,"children":2885},{"style":394},[2886],{"type":52,"value":427},{"type":47,"tag":230,"props":2888,"children":2889},{"style":242},[2890],{"type":52,"value":432},{"type":47,"tag":230,"props":2892,"children":2893},{"class":232,"line":833},[2894],{"type":47,"tag":230,"props":2895,"children":2896},{"style":439},[2897],{"type":52,"value":2898},"    \u002F\u002F Critical tickets get highest priority (300s ahead)\n",{"type":47,"tag":230,"props":2900,"children":2901},{"class":232,"line":842},[2902],{"type":47,"tag":230,"props":2903,"children":2904},{"style":439},[2905],{"type":52,"value":2906},"    \u002F\u002F High severity: 120s ahead\n",{"type":47,"tag":230,"props":2908,"children":2909},{"class":232,"line":850},[2910],{"type":47,"tag":230,"props":2911,"children":2912},{"style":439},[2913],{"type":52,"value":2914},"    \u002F\u002F Enterprise users: 60s ahead\n",{"type":47,"tag":230,"props":2916,"children":2918},{"class":232,"line":2917},17,[2919],{"type":47,"tag":230,"props":2920,"children":2921},{"style":439},[2922],{"type":52,"value":2923},"    \u002F\u002F Everyone else: normal priority\n",{"type":47,"tag":230,"props":2925,"children":2927},{"class":232,"line":2926},18,[2928],{"type":47,"tag":230,"props":2929,"children":2930},{"style":242},[2931],{"type":52,"value":547},{"type":47,"tag":230,"props":2933,"children":2935},{"class":232,"line":2934},19,[2936,2940],{"type":47,"tag":230,"props":2937,"children":2938},{"style":237},[2939],{"type":52,"value":556},{"type":47,"tag":230,"props":2941,"children":2942},{"style":242},[2943],{"type":52,"value":538},{"type":47,"tag":87,"props":2945,"children":2947},{"id":2946},"singleton",[2948],{"type":52,"value":2949},"Singleton",{"type":47,"tag":55,"props":2951,"children":2952},{},[2953,2957],{"type":47,"tag":68,"props":2954,"children":2955},{},[2956],{"type":52,"value":181},{"type":52,"value":2958}," Ensure only one instance of a function runs at a time.",{"type":47,"tag":212,"props":2960,"children":2962},{"id":2961},"skip-mode-preserve-current-run",[2963],{"type":52,"value":2964},"Skip Mode (Preserve Current Run)",{"type":47,"tag":219,"props":2966,"children":2968},{"className":221,"code":2967,"language":223,"meta":224,"style":224},"inngest.createFunction(\n  {\n    id: \"data-backup\",\n    singleton: {\n      key: \"event.data.database_id\",\n      mode: \"skip\"\n    },\n    triggers: [{ event: \"backup\u002Frequested\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Skip new backups if one is already running for this database\n    await step.run(\"backup\", () => performBackup(event.data.database_id));\n  }\n);\n",[2969],{"type":47,"tag":195,"props":2970,"children":2971},{"__ignoreMap":224},[2972,2991,2998,3026,3042,3070,3095,3102,3150,3157,3192,3200,3286,3293],{"type":47,"tag":230,"props":2973,"children":2974},{"class":232,"line":233},[2975,2979,2983,2987],{"type":47,"tag":230,"props":2976,"children":2977},{"style":237},[2978],{"type":52,"value":8},{"type":47,"tag":230,"props":2980,"children":2981},{"style":242},[2982],{"type":52,"value":245},{"type":47,"tag":230,"props":2984,"children":2985},{"style":248},[2986],{"type":52,"value":251},{"type":47,"tag":230,"props":2988,"children":2989},{"style":237},[2990],{"type":52,"value":256},{"type":47,"tag":230,"props":2992,"children":2993},{"class":232,"line":259},[2994],{"type":47,"tag":230,"props":2995,"children":2996},{"style":242},[2997],{"type":52,"value":265},{"type":47,"tag":230,"props":2999,"children":3000},{"class":232,"line":268},[3001,3005,3009,3013,3018,3022],{"type":47,"tag":230,"props":3002,"children":3003},{"style":272},[3004],{"type":52,"value":275},{"type":47,"tag":230,"props":3006,"children":3007},{"style":242},[3008],{"type":52,"value":280},{"type":47,"tag":230,"props":3010,"children":3011},{"style":242},[3012],{"type":52,"value":285},{"type":47,"tag":230,"props":3014,"children":3015},{"style":288},[3016],{"type":52,"value":3017},"data-backup",{"type":47,"tag":230,"props":3019,"children":3020},{"style":242},[3021],{"type":52,"value":296},{"type":47,"tag":230,"props":3023,"children":3024},{"style":242},[3025],{"type":52,"value":301},{"type":47,"tag":230,"props":3027,"children":3028},{"class":232,"line":304},[3029,3034,3038],{"type":47,"tag":230,"props":3030,"children":3031},{"style":272},[3032],{"type":52,"value":3033},"    singleton",{"type":47,"tag":230,"props":3035,"children":3036},{"style":242},[3037],{"type":52,"value":280},{"type":47,"tag":230,"props":3039,"children":3040},{"style":242},[3041],{"type":52,"value":432},{"type":47,"tag":230,"props":3043,"children":3044},{"class":232,"line":27},[3045,3049,3053,3057,3062,3066],{"type":47,"tag":230,"props":3046,"children":3047},{"style":272},[3048],{"type":52,"value":1378},{"type":47,"tag":230,"props":3050,"children":3051},{"style":242},[3052],{"type":52,"value":280},{"type":47,"tag":230,"props":3054,"children":3055},{"style":242},[3056],{"type":52,"value":285},{"type":47,"tag":230,"props":3058,"children":3059},{"style":288},[3060],{"type":52,"value":3061},"event.data.database_id",{"type":47,"tag":230,"props":3063,"children":3064},{"style":242},[3065],{"type":52,"value":296},{"type":47,"tag":230,"props":3067,"children":3068},{"style":242},[3069],{"type":52,"value":301},{"type":47,"tag":230,"props":3071,"children":3072},{"class":232,"line":381},[3073,3078,3082,3086,3091],{"type":47,"tag":230,"props":3074,"children":3075},{"style":272},[3076],{"type":52,"value":3077},"      mode",{"type":47,"tag":230,"props":3079,"children":3080},{"style":242},[3081],{"type":52,"value":280},{"type":47,"tag":230,"props":3083,"children":3084},{"style":242},[3085],{"type":52,"value":285},{"type":47,"tag":230,"props":3087,"children":3088},{"style":288},[3089],{"type":52,"value":3090},"skip",{"type":47,"tag":230,"props":3092,"children":3093},{"style":242},[3094],{"type":52,"value":1839},{"type":47,"tag":230,"props":3096,"children":3097},{"class":232,"line":390},[3098],{"type":47,"tag":230,"props":3099,"children":3100},{"style":242},[3101],{"type":52,"value":1408},{"type":47,"tag":230,"props":3103,"children":3104},{"class":232,"line":435},[3105,3109,3113,3117,3121,3125,3129,3133,3138,3142,3146],{"type":47,"tag":230,"props":3106,"children":3107},{"style":272},[3108],{"type":52,"value":332},{"type":47,"tag":230,"props":3110,"children":3111},{"style":242},[3112],{"type":52,"value":280},{"type":47,"tag":230,"props":3114,"children":3115},{"style":237},[3116],{"type":52,"value":341},{"type":47,"tag":230,"props":3118,"children":3119},{"style":242},[3120],{"type":52,"value":346},{"type":47,"tag":230,"props":3122,"children":3123},{"style":272},[3124],{"type":52,"value":351},{"type":47,"tag":230,"props":3126,"children":3127},{"style":242},[3128],{"type":52,"value":280},{"type":47,"tag":230,"props":3130,"children":3131},{"style":242},[3132],{"type":52,"value":285},{"type":47,"tag":230,"props":3134,"children":3135},{"style":288},[3136],{"type":52,"value":3137},"backup\u002Frequested",{"type":47,"tag":230,"props":3139,"children":3140},{"style":242},[3141],{"type":52,"value":296},{"type":47,"tag":230,"props":3143,"children":3144},{"style":242},[3145],{"type":52,"value":373},{"type":47,"tag":230,"props":3147,"children":3148},{"style":237},[3149],{"type":52,"value":378},{"type":47,"tag":230,"props":3151,"children":3152},{"class":232,"line":445},[3153],{"type":47,"tag":230,"props":3154,"children":3155},{"style":242},[3156],{"type":52,"value":387},{"type":47,"tag":230,"props":3158,"children":3159},{"class":232,"line":541},[3160,3164,3168,3172,3176,3180,3184,3188],{"type":47,"tag":230,"props":3161,"children":3162},{"style":394},[3163],{"type":52,"value":397},{"type":47,"tag":230,"props":3165,"children":3166},{"style":242},[3167],{"type":52,"value":402},{"type":47,"tag":230,"props":3169,"children":3170},{"style":405},[3171],{"type":52,"value":351},{"type":47,"tag":230,"props":3173,"children":3174},{"style":242},[3175],{"type":52,"value":412},{"type":47,"tag":230,"props":3177,"children":3178},{"style":405},[3179],{"type":52,"value":417},{"type":47,"tag":230,"props":3181,"children":3182},{"style":242},[3183],{"type":52,"value":422},{"type":47,"tag":230,"props":3185,"children":3186},{"style":394},[3187],{"type":52,"value":427},{"type":47,"tag":230,"props":3189,"children":3190},{"style":242},[3191],{"type":52,"value":432},{"type":47,"tag":230,"props":3193,"children":3194},{"class":232,"line":550},[3195],{"type":47,"tag":230,"props":3196,"children":3197},{"style":439},[3198],{"type":52,"value":3199},"    \u002F\u002F Skip new backups if one is already running for this database\n",{"type":47,"tag":230,"props":3201,"children":3202},{"class":232,"line":788},[3203,3207,3211,3215,3219,3223,3227,3232,3236,3240,3244,3248,3253,3257,3261,3265,3269,3273,3278,3282],{"type":47,"tag":230,"props":3204,"children":3205},{"style":449},[3206],{"type":52,"value":452},{"type":47,"tag":230,"props":3208,"children":3209},{"style":237},[3210],{"type":52,"value":417},{"type":47,"tag":230,"props":3212,"children":3213},{"style":242},[3214],{"type":52,"value":245},{"type":47,"tag":230,"props":3216,"children":3217},{"style":248},[3218],{"type":52,"value":465},{"type":47,"tag":230,"props":3220,"children":3221},{"style":272},[3222],{"type":52,"value":470},{"type":47,"tag":230,"props":3224,"children":3225},{"style":242},[3226],{"type":52,"value":296},{"type":47,"tag":230,"props":3228,"children":3229},{"style":288},[3230],{"type":52,"value":3231},"backup",{"type":47,"tag":230,"props":3233,"children":3234},{"style":242},[3235],{"type":52,"value":296},{"type":47,"tag":230,"props":3237,"children":3238},{"style":242},[3239],{"type":52,"value":412},{"type":47,"tag":230,"props":3241,"children":3242},{"style":242},[3243],{"type":52,"value":492},{"type":47,"tag":230,"props":3245,"children":3246},{"style":394},[3247],{"type":52,"value":427},{"type":47,"tag":230,"props":3249,"children":3250},{"style":248},[3251],{"type":52,"value":3252}," performBackup",{"type":47,"tag":230,"props":3254,"children":3255},{"style":272},[3256],{"type":52,"value":470},{"type":47,"tag":230,"props":3258,"children":3259},{"style":237},[3260],{"type":52,"value":510},{"type":47,"tag":230,"props":3262,"children":3263},{"style":242},[3264],{"type":52,"value":245},{"type":47,"tag":230,"props":3266,"children":3267},{"style":237},[3268],{"type":52,"value":519},{"type":47,"tag":230,"props":3270,"children":3271},{"style":242},[3272],{"type":52,"value":245},{"type":47,"tag":230,"props":3274,"children":3275},{"style":237},[3276],{"type":52,"value":3277},"database_id",{"type":47,"tag":230,"props":3279,"children":3280},{"style":272},[3281],{"type":52,"value":533},{"type":47,"tag":230,"props":3283,"children":3284},{"style":242},[3285],{"type":52,"value":538},{"type":47,"tag":230,"props":3287,"children":3288},{"class":232,"line":824},[3289],{"type":47,"tag":230,"props":3290,"children":3291},{"style":242},[3292],{"type":52,"value":547},{"type":47,"tag":230,"props":3294,"children":3295},{"class":232,"line":833},[3296,3300],{"type":47,"tag":230,"props":3297,"children":3298},{"style":237},[3299],{"type":52,"value":556},{"type":47,"tag":230,"props":3301,"children":3302},{"style":242},[3303],{"type":52,"value":538},{"type":47,"tag":212,"props":3305,"children":3307},{"id":3306},"cancel-mode-use-latest-event",[3308],{"type":52,"value":3309},"Cancel Mode (Use Latest Event)",{"type":47,"tag":219,"props":3311,"children":3313},{"className":221,"code":3312,"language":223,"meta":224,"style":224},"inngest.createFunction(\n  {\n    id: \"realtime-sync\",\n    singleton: {\n      key: \"event.data.user_id\",\n      mode: \"cancel\"\n    },\n    triggers: [{ event: \"user\u002Fdata.changed\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Cancel previous sync and start with latest data\n    await step.run(\"sync\", () => syncUserData(event.data));\n  }\n);\n",[3314],{"type":47,"tag":195,"props":3315,"children":3316},{"__ignoreMap":224},[3317,3336,3343,3371,3386,3413,3437,3444,3492,3499,3534,3542,3618,3625],{"type":47,"tag":230,"props":3318,"children":3319},{"class":232,"line":233},[3320,3324,3328,3332],{"type":47,"tag":230,"props":3321,"children":3322},{"style":237},[3323],{"type":52,"value":8},{"type":47,"tag":230,"props":3325,"children":3326},{"style":242},[3327],{"type":52,"value":245},{"type":47,"tag":230,"props":3329,"children":3330},{"style":248},[3331],{"type":52,"value":251},{"type":47,"tag":230,"props":3333,"children":3334},{"style":237},[3335],{"type":52,"value":256},{"type":47,"tag":230,"props":3337,"children":3338},{"class":232,"line":259},[3339],{"type":47,"tag":230,"props":3340,"children":3341},{"style":242},[3342],{"type":52,"value":265},{"type":47,"tag":230,"props":3344,"children":3345},{"class":232,"line":268},[3346,3350,3354,3358,3363,3367],{"type":47,"tag":230,"props":3347,"children":3348},{"style":272},[3349],{"type":52,"value":275},{"type":47,"tag":230,"props":3351,"children":3352},{"style":242},[3353],{"type":52,"value":280},{"type":47,"tag":230,"props":3355,"children":3356},{"style":242},[3357],{"type":52,"value":285},{"type":47,"tag":230,"props":3359,"children":3360},{"style":288},[3361],{"type":52,"value":3362},"realtime-sync",{"type":47,"tag":230,"props":3364,"children":3365},{"style":242},[3366],{"type":52,"value":296},{"type":47,"tag":230,"props":3368,"children":3369},{"style":242},[3370],{"type":52,"value":301},{"type":47,"tag":230,"props":3372,"children":3373},{"class":232,"line":304},[3374,3378,3382],{"type":47,"tag":230,"props":3375,"children":3376},{"style":272},[3377],{"type":52,"value":3033},{"type":47,"tag":230,"props":3379,"children":3380},{"style":242},[3381],{"type":52,"value":280},{"type":47,"tag":230,"props":3383,"children":3384},{"style":242},[3385],{"type":52,"value":432},{"type":47,"tag":230,"props":3387,"children":3388},{"class":232,"line":27},[3389,3393,3397,3401,3405,3409],{"type":47,"tag":230,"props":3390,"children":3391},{"style":272},[3392],{"type":52,"value":1378},{"type":47,"tag":230,"props":3394,"children":3395},{"style":242},[3396],{"type":52,"value":280},{"type":47,"tag":230,"props":3398,"children":3399},{"style":242},[3400],{"type":52,"value":285},{"type":47,"tag":230,"props":3402,"children":3403},{"style":288},[3404],{"type":52,"value":685},{"type":47,"tag":230,"props":3406,"children":3407},{"style":242},[3408],{"type":52,"value":296},{"type":47,"tag":230,"props":3410,"children":3411},{"style":242},[3412],{"type":52,"value":301},{"type":47,"tag":230,"props":3414,"children":3415},{"class":232,"line":381},[3416,3420,3424,3428,3433],{"type":47,"tag":230,"props":3417,"children":3418},{"style":272},[3419],{"type":52,"value":3077},{"type":47,"tag":230,"props":3421,"children":3422},{"style":242},[3423],{"type":52,"value":280},{"type":47,"tag":230,"props":3425,"children":3426},{"style":242},[3427],{"type":52,"value":285},{"type":47,"tag":230,"props":3429,"children":3430},{"style":288},[3431],{"type":52,"value":3432},"cancel",{"type":47,"tag":230,"props":3434,"children":3435},{"style":242},[3436],{"type":52,"value":1839},{"type":47,"tag":230,"props":3438,"children":3439},{"class":232,"line":390},[3440],{"type":47,"tag":230,"props":3441,"children":3442},{"style":242},[3443],{"type":52,"value":1408},{"type":47,"tag":230,"props":3445,"children":3446},{"class":232,"line":435},[3447,3451,3455,3459,3463,3467,3471,3475,3480,3484,3488],{"type":47,"tag":230,"props":3448,"children":3449},{"style":272},[3450],{"type":52,"value":332},{"type":47,"tag":230,"props":3452,"children":3453},{"style":242},[3454],{"type":52,"value":280},{"type":47,"tag":230,"props":3456,"children":3457},{"style":237},[3458],{"type":52,"value":341},{"type":47,"tag":230,"props":3460,"children":3461},{"style":242},[3462],{"type":52,"value":346},{"type":47,"tag":230,"props":3464,"children":3465},{"style":272},[3466],{"type":52,"value":351},{"type":47,"tag":230,"props":3468,"children":3469},{"style":242},[3470],{"type":52,"value":280},{"type":47,"tag":230,"props":3472,"children":3473},{"style":242},[3474],{"type":52,"value":285},{"type":47,"tag":230,"props":3476,"children":3477},{"style":288},[3478],{"type":52,"value":3479},"user\u002Fdata.changed",{"type":47,"tag":230,"props":3481,"children":3482},{"style":242},[3483],{"type":52,"value":296},{"type":47,"tag":230,"props":3485,"children":3486},{"style":242},[3487],{"type":52,"value":373},{"type":47,"tag":230,"props":3489,"children":3490},{"style":237},[3491],{"type":52,"value":378},{"type":47,"tag":230,"props":3493,"children":3494},{"class":232,"line":445},[3495],{"type":47,"tag":230,"props":3496,"children":3497},{"style":242},[3498],{"type":52,"value":387},{"type":47,"tag":230,"props":3500,"children":3501},{"class":232,"line":541},[3502,3506,3510,3514,3518,3522,3526,3530],{"type":47,"tag":230,"props":3503,"children":3504},{"style":394},[3505],{"type":52,"value":397},{"type":47,"tag":230,"props":3507,"children":3508},{"style":242},[3509],{"type":52,"value":402},{"type":47,"tag":230,"props":3511,"children":3512},{"style":405},[3513],{"type":52,"value":351},{"type":47,"tag":230,"props":3515,"children":3516},{"style":242},[3517],{"type":52,"value":412},{"type":47,"tag":230,"props":3519,"children":3520},{"style":405},[3521],{"type":52,"value":417},{"type":47,"tag":230,"props":3523,"children":3524},{"style":242},[3525],{"type":52,"value":422},{"type":47,"tag":230,"props":3527,"children":3528},{"style":394},[3529],{"type":52,"value":427},{"type":47,"tag":230,"props":3531,"children":3532},{"style":242},[3533],{"type":52,"value":432},{"type":47,"tag":230,"props":3535,"children":3536},{"class":232,"line":550},[3537],{"type":47,"tag":230,"props":3538,"children":3539},{"style":439},[3540],{"type":52,"value":3541},"    \u002F\u002F Cancel previous sync and start with latest data\n",{"type":47,"tag":230,"props":3543,"children":3544},{"class":232,"line":788},[3545,3549,3553,3557,3561,3565,3569,3573,3577,3581,3585,3589,3594,3598,3602,3606,3610,3614],{"type":47,"tag":230,"props":3546,"children":3547},{"style":449},[3548],{"type":52,"value":452},{"type":47,"tag":230,"props":3550,"children":3551},{"style":237},[3552],{"type":52,"value":417},{"type":47,"tag":230,"props":3554,"children":3555},{"style":242},[3556],{"type":52,"value":245},{"type":47,"tag":230,"props":3558,"children":3559},{"style":248},[3560],{"type":52,"value":465},{"type":47,"tag":230,"props":3562,"children":3563},{"style":272},[3564],{"type":52,"value":470},{"type":47,"tag":230,"props":3566,"children":3567},{"style":242},[3568],{"type":52,"value":296},{"type":47,"tag":230,"props":3570,"children":3571},{"style":288},[3572],{"type":52,"value":1538},{"type":47,"tag":230,"props":3574,"children":3575},{"style":242},[3576],{"type":52,"value":296},{"type":47,"tag":230,"props":3578,"children":3579},{"style":242},[3580],{"type":52,"value":412},{"type":47,"tag":230,"props":3582,"children":3583},{"style":242},[3584],{"type":52,"value":492},{"type":47,"tag":230,"props":3586,"children":3587},{"style":394},[3588],{"type":52,"value":427},{"type":47,"tag":230,"props":3590,"children":3591},{"style":248},[3592],{"type":52,"value":3593}," syncUserData",{"type":47,"tag":230,"props":3595,"children":3596},{"style":272},[3597],{"type":52,"value":470},{"type":47,"tag":230,"props":3599,"children":3600},{"style":237},[3601],{"type":52,"value":510},{"type":47,"tag":230,"props":3603,"children":3604},{"style":242},[3605],{"type":52,"value":245},{"type":47,"tag":230,"props":3607,"children":3608},{"style":237},[3609],{"type":52,"value":519},{"type":47,"tag":230,"props":3611,"children":3612},{"style":272},[3613],{"type":52,"value":533},{"type":47,"tag":230,"props":3615,"children":3616},{"style":242},[3617],{"type":52,"value":538},{"type":47,"tag":230,"props":3619,"children":3620},{"class":232,"line":824},[3621],{"type":47,"tag":230,"props":3622,"children":3623},{"style":242},[3624],{"type":52,"value":547},{"type":47,"tag":230,"props":3626,"children":3627},{"class":232,"line":833},[3628,3632],{"type":47,"tag":230,"props":3629,"children":3630},{"style":237},[3631],{"type":52,"value":556},{"type":47,"tag":230,"props":3633,"children":3634},{"style":242},[3635],{"type":52,"value":538},{"type":47,"tag":87,"props":3637,"children":3639},{"id":3638},"batching",[3640],{"type":52,"value":3641},"Batching",{"type":47,"tag":55,"props":3643,"children":3644},{},[3645,3649],{"type":47,"tag":68,"props":3646,"children":3647},{},[3648],{"type":52,"value":181},{"type":52,"value":3650}," Process multiple events together for efficiency.",{"type":47,"tag":219,"props":3652,"children":3654},{"className":221,"code":3653,"language":223,"meta":224,"style":224},"inngest.createFunction(\n  {\n    id: \"bulk-email-send\",\n    batchEvents: {\n      maxSize: 100, \u002F\u002F Up to 100 events\n      timeout: \"30s\", \u002F\u002F Or 30 seconds, whichever first\n      \u002F\u002F `key` groups events into separate batches per unique value\n      \u002F\u002F This is different from expressions `if` which filters events\n      key: \"event.data.campaign_id\" \u002F\u002F Batch per campaign\n    },\n    triggers: [{ event: \"email\u002Fsend.queued\" }]\n  },\n  async ({ events, step }) => {\n    \u002F\u002F Process array of events together\n    const emails = events.map((evt) => ({\n      to: evt.data.email,\n      subject: evt.data.subject,\n      body: evt.data.body\n    }));\n\n    await step.run(\"send-batch\", () => emailService.sendBulk(emails));\n  }\n);\n",[3655],{"type":47,"tag":195,"props":3656,"children":3657},{"__ignoreMap":224},[3658,3677,3684,3712,3728,3754,3787,3795,3803,3832,3839,3887,3894,3930,3938,4000,4038,4075,4108,4124,4134,4214,4222],{"type":47,"tag":230,"props":3659,"children":3660},{"class":232,"line":233},[3661,3665,3669,3673],{"type":47,"tag":230,"props":3662,"children":3663},{"style":237},[3664],{"type":52,"value":8},{"type":47,"tag":230,"props":3666,"children":3667},{"style":242},[3668],{"type":52,"value":245},{"type":47,"tag":230,"props":3670,"children":3671},{"style":248},[3672],{"type":52,"value":251},{"type":47,"tag":230,"props":3674,"children":3675},{"style":237},[3676],{"type":52,"value":256},{"type":47,"tag":230,"props":3678,"children":3679},{"class":232,"line":259},[3680],{"type":47,"tag":230,"props":3681,"children":3682},{"style":242},[3683],{"type":52,"value":265},{"type":47,"tag":230,"props":3685,"children":3686},{"class":232,"line":268},[3687,3691,3695,3699,3704,3708],{"type":47,"tag":230,"props":3688,"children":3689},{"style":272},[3690],{"type":52,"value":275},{"type":47,"tag":230,"props":3692,"children":3693},{"style":242},[3694],{"type":52,"value":280},{"type":47,"tag":230,"props":3696,"children":3697},{"style":242},[3698],{"type":52,"value":285},{"type":47,"tag":230,"props":3700,"children":3701},{"style":288},[3702],{"type":52,"value":3703},"bulk-email-send",{"type":47,"tag":230,"props":3705,"children":3706},{"style":242},[3707],{"type":52,"value":296},{"type":47,"tag":230,"props":3709,"children":3710},{"style":242},[3711],{"type":52,"value":301},{"type":47,"tag":230,"props":3713,"children":3714},{"class":232,"line":304},[3715,3720,3724],{"type":47,"tag":230,"props":3716,"children":3717},{"style":272},[3718],{"type":52,"value":3719},"    batchEvents",{"type":47,"tag":230,"props":3721,"children":3722},{"style":242},[3723],{"type":52,"value":280},{"type":47,"tag":230,"props":3725,"children":3726},{"style":242},[3727],{"type":52,"value":432},{"type":47,"tag":230,"props":3729,"children":3730},{"class":232,"line":27},[3731,3736,3740,3745,3749],{"type":47,"tag":230,"props":3732,"children":3733},{"style":272},[3734],{"type":52,"value":3735},"      maxSize",{"type":47,"tag":230,"props":3737,"children":3738},{"style":242},[3739],{"type":52,"value":280},{"type":47,"tag":230,"props":3741,"children":3742},{"style":317},[3743],{"type":52,"value":3744}," 100",{"type":47,"tag":230,"props":3746,"children":3747},{"style":242},[3748],{"type":52,"value":412},{"type":47,"tag":230,"props":3750,"children":3751},{"style":439},[3752],{"type":52,"value":3753}," \u002F\u002F Up to 100 events\n",{"type":47,"tag":230,"props":3755,"children":3756},{"class":232,"line":381},[3757,3761,3765,3769,3774,3778,3782],{"type":47,"tag":230,"props":3758,"children":3759},{"style":272},[3760],{"type":52,"value":2157},{"type":47,"tag":230,"props":3762,"children":3763},{"style":242},[3764],{"type":52,"value":280},{"type":47,"tag":230,"props":3766,"children":3767},{"style":242},[3768],{"type":52,"value":285},{"type":47,"tag":230,"props":3770,"children":3771},{"style":288},[3772],{"type":52,"value":3773},"30s",{"type":47,"tag":230,"props":3775,"children":3776},{"style":242},[3777],{"type":52,"value":296},{"type":47,"tag":230,"props":3779,"children":3780},{"style":242},[3781],{"type":52,"value":412},{"type":47,"tag":230,"props":3783,"children":3784},{"style":439},[3785],{"type":52,"value":3786}," \u002F\u002F Or 30 seconds, whichever first\n",{"type":47,"tag":230,"props":3788,"children":3789},{"class":232,"line":390},[3790],{"type":47,"tag":230,"props":3791,"children":3792},{"style":439},[3793],{"type":52,"value":3794},"      \u002F\u002F `key` groups events into separate batches per unique value\n",{"type":47,"tag":230,"props":3796,"children":3797},{"class":232,"line":435},[3798],{"type":47,"tag":230,"props":3799,"children":3800},{"style":439},[3801],{"type":52,"value":3802},"      \u002F\u002F This is different from expressions `if` which filters events\n",{"type":47,"tag":230,"props":3804,"children":3805},{"class":232,"line":445},[3806,3810,3814,3818,3823,3827],{"type":47,"tag":230,"props":3807,"children":3808},{"style":272},[3809],{"type":52,"value":1378},{"type":47,"tag":230,"props":3811,"children":3812},{"style":242},[3813],{"type":52,"value":280},{"type":47,"tag":230,"props":3815,"children":3816},{"style":242},[3817],{"type":52,"value":285},{"type":47,"tag":230,"props":3819,"children":3820},{"style":288},[3821],{"type":52,"value":3822},"event.data.campaign_id",{"type":47,"tag":230,"props":3824,"children":3825},{"style":242},[3826],{"type":52,"value":296},{"type":47,"tag":230,"props":3828,"children":3829},{"style":439},[3830],{"type":52,"value":3831}," \u002F\u002F Batch per campaign\n",{"type":47,"tag":230,"props":3833,"children":3834},{"class":232,"line":541},[3835],{"type":47,"tag":230,"props":3836,"children":3837},{"style":242},[3838],{"type":52,"value":1408},{"type":47,"tag":230,"props":3840,"children":3841},{"class":232,"line":550},[3842,3846,3850,3854,3858,3862,3866,3870,3875,3879,3883],{"type":47,"tag":230,"props":3843,"children":3844},{"style":272},[3845],{"type":52,"value":332},{"type":47,"tag":230,"props":3847,"children":3848},{"style":242},[3849],{"type":52,"value":280},{"type":47,"tag":230,"props":3851,"children":3852},{"style":237},[3853],{"type":52,"value":341},{"type":47,"tag":230,"props":3855,"children":3856},{"style":242},[3857],{"type":52,"value":346},{"type":47,"tag":230,"props":3859,"children":3860},{"style":272},[3861],{"type":52,"value":351},{"type":47,"tag":230,"props":3863,"children":3864},{"style":242},[3865],{"type":52,"value":280},{"type":47,"tag":230,"props":3867,"children":3868},{"style":242},[3869],{"type":52,"value":285},{"type":47,"tag":230,"props":3871,"children":3872},{"style":288},[3873],{"type":52,"value":3874},"email\u002Fsend.queued",{"type":47,"tag":230,"props":3876,"children":3877},{"style":242},[3878],{"type":52,"value":296},{"type":47,"tag":230,"props":3880,"children":3881},{"style":242},[3882],{"type":52,"value":373},{"type":47,"tag":230,"props":3884,"children":3885},{"style":237},[3886],{"type":52,"value":378},{"type":47,"tag":230,"props":3888,"children":3889},{"class":232,"line":788},[3890],{"type":47,"tag":230,"props":3891,"children":3892},{"style":242},[3893],{"type":52,"value":387},{"type":47,"tag":230,"props":3895,"children":3896},{"class":232,"line":824},[3897,3901,3905,3910,3914,3918,3922,3926],{"type":47,"tag":230,"props":3898,"children":3899},{"style":394},[3900],{"type":52,"value":397},{"type":47,"tag":230,"props":3902,"children":3903},{"style":242},[3904],{"type":52,"value":402},{"type":47,"tag":230,"props":3906,"children":3907},{"style":405},[3908],{"type":52,"value":3909}," events",{"type":47,"tag":230,"props":3911,"children":3912},{"style":242},[3913],{"type":52,"value":412},{"type":47,"tag":230,"props":3915,"children":3916},{"style":405},[3917],{"type":52,"value":417},{"type":47,"tag":230,"props":3919,"children":3920},{"style":242},[3921],{"type":52,"value":422},{"type":47,"tag":230,"props":3923,"children":3924},{"style":394},[3925],{"type":52,"value":427},{"type":47,"tag":230,"props":3927,"children":3928},{"style":242},[3929],{"type":52,"value":432},{"type":47,"tag":230,"props":3931,"children":3932},{"class":232,"line":833},[3933],{"type":47,"tag":230,"props":3934,"children":3935},{"style":439},[3936],{"type":52,"value":3937},"    \u002F\u002F Process array of events together\n",{"type":47,"tag":230,"props":3939,"children":3940},{"class":232,"line":842},[3941,3946,3951,3956,3960,3964,3969,3973,3977,3982,3986,3990,3995],{"type":47,"tag":230,"props":3942,"children":3943},{"style":394},[3944],{"type":52,"value":3945},"    const",{"type":47,"tag":230,"props":3947,"children":3948},{"style":237},[3949],{"type":52,"value":3950}," emails",{"type":47,"tag":230,"props":3952,"children":3953},{"style":242},[3954],{"type":52,"value":3955}," =",{"type":47,"tag":230,"props":3957,"children":3958},{"style":237},[3959],{"type":52,"value":3909},{"type":47,"tag":230,"props":3961,"children":3962},{"style":242},[3963],{"type":52,"value":245},{"type":47,"tag":230,"props":3965,"children":3966},{"style":248},[3967],{"type":52,"value":3968},"map",{"type":47,"tag":230,"props":3970,"children":3971},{"style":272},[3972],{"type":52,"value":470},{"type":47,"tag":230,"props":3974,"children":3975},{"style":242},[3976],{"type":52,"value":470},{"type":47,"tag":230,"props":3978,"children":3979},{"style":405},[3980],{"type":52,"value":3981},"evt",{"type":47,"tag":230,"props":3983,"children":3984},{"style":242},[3985],{"type":52,"value":556},{"type":47,"tag":230,"props":3987,"children":3988},{"style":394},[3989],{"type":52,"value":427},{"type":47,"tag":230,"props":3991,"children":3992},{"style":272},[3993],{"type":52,"value":3994}," (",{"type":47,"tag":230,"props":3996,"children":3997},{"style":242},[3998],{"type":52,"value":3999},"{\n",{"type":47,"tag":230,"props":4001,"children":4002},{"class":232,"line":850},[4003,4008,4012,4017,4021,4025,4029,4034],{"type":47,"tag":230,"props":4004,"children":4005},{"style":272},[4006],{"type":52,"value":4007},"      to",{"type":47,"tag":230,"props":4009,"children":4010},{"style":242},[4011],{"type":52,"value":280},{"type":47,"tag":230,"props":4013,"children":4014},{"style":237},[4015],{"type":52,"value":4016}," evt",{"type":47,"tag":230,"props":4018,"children":4019},{"style":242},[4020],{"type":52,"value":245},{"type":47,"tag":230,"props":4022,"children":4023},{"style":237},[4024],{"type":52,"value":519},{"type":47,"tag":230,"props":4026,"children":4027},{"style":242},[4028],{"type":52,"value":245},{"type":47,"tag":230,"props":4030,"children":4031},{"style":237},[4032],{"type":52,"value":4033},"email",{"type":47,"tag":230,"props":4035,"children":4036},{"style":242},[4037],{"type":52,"value":301},{"type":47,"tag":230,"props":4039,"children":4040},{"class":232,"line":2917},[4041,4046,4050,4054,4058,4062,4066,4071],{"type":47,"tag":230,"props":4042,"children":4043},{"style":272},[4044],{"type":52,"value":4045},"      subject",{"type":47,"tag":230,"props":4047,"children":4048},{"style":242},[4049],{"type":52,"value":280},{"type":47,"tag":230,"props":4051,"children":4052},{"style":237},[4053],{"type":52,"value":4016},{"type":47,"tag":230,"props":4055,"children":4056},{"style":242},[4057],{"type":52,"value":245},{"type":47,"tag":230,"props":4059,"children":4060},{"style":237},[4061],{"type":52,"value":519},{"type":47,"tag":230,"props":4063,"children":4064},{"style":242},[4065],{"type":52,"value":245},{"type":47,"tag":230,"props":4067,"children":4068},{"style":237},[4069],{"type":52,"value":4070},"subject",{"type":47,"tag":230,"props":4072,"children":4073},{"style":242},[4074],{"type":52,"value":301},{"type":47,"tag":230,"props":4076,"children":4077},{"class":232,"line":2926},[4078,4083,4087,4091,4095,4099,4103],{"type":47,"tag":230,"props":4079,"children":4080},{"style":272},[4081],{"type":52,"value":4082},"      body",{"type":47,"tag":230,"props":4084,"children":4085},{"style":242},[4086],{"type":52,"value":280},{"type":47,"tag":230,"props":4088,"children":4089},{"style":237},[4090],{"type":52,"value":4016},{"type":47,"tag":230,"props":4092,"children":4093},{"style":242},[4094],{"type":52,"value":245},{"type":47,"tag":230,"props":4096,"children":4097},{"style":237},[4098],{"type":52,"value":519},{"type":47,"tag":230,"props":4100,"children":4101},{"style":242},[4102],{"type":52,"value":245},{"type":47,"tag":230,"props":4104,"children":4105},{"style":237},[4106],{"type":52,"value":4107},"body\n",{"type":47,"tag":230,"props":4109,"children":4110},{"class":232,"line":2934},[4111,4116,4120],{"type":47,"tag":230,"props":4112,"children":4113},{"style":242},[4114],{"type":52,"value":4115},"    }",{"type":47,"tag":230,"props":4117,"children":4118},{"style":272},[4119],{"type":52,"value":533},{"type":47,"tag":230,"props":4121,"children":4122},{"style":242},[4123],{"type":52,"value":538},{"type":47,"tag":230,"props":4125,"children":4127},{"class":232,"line":4126},20,[4128],{"type":47,"tag":230,"props":4129,"children":4131},{"emptyLinePlaceholder":4130},true,[4132],{"type":52,"value":4133},"\n",{"type":47,"tag":230,"props":4135,"children":4137},{"class":232,"line":4136},21,[4138,4142,4146,4150,4154,4158,4162,4167,4171,4175,4179,4183,4188,4192,4197,4201,4206,4210],{"type":47,"tag":230,"props":4139,"children":4140},{"style":449},[4141],{"type":52,"value":452},{"type":47,"tag":230,"props":4143,"children":4144},{"style":237},[4145],{"type":52,"value":417},{"type":47,"tag":230,"props":4147,"children":4148},{"style":242},[4149],{"type":52,"value":245},{"type":47,"tag":230,"props":4151,"children":4152},{"style":248},[4153],{"type":52,"value":465},{"type":47,"tag":230,"props":4155,"children":4156},{"style":272},[4157],{"type":52,"value":470},{"type":47,"tag":230,"props":4159,"children":4160},{"style":242},[4161],{"type":52,"value":296},{"type":47,"tag":230,"props":4163,"children":4164},{"style":288},[4165],{"type":52,"value":4166},"send-batch",{"type":47,"tag":230,"props":4168,"children":4169},{"style":242},[4170],{"type":52,"value":296},{"type":47,"tag":230,"props":4172,"children":4173},{"style":242},[4174],{"type":52,"value":412},{"type":47,"tag":230,"props":4176,"children":4177},{"style":242},[4178],{"type":52,"value":492},{"type":47,"tag":230,"props":4180,"children":4181},{"style":394},[4182],{"type":52,"value":427},{"type":47,"tag":230,"props":4184,"children":4185},{"style":237},[4186],{"type":52,"value":4187}," emailService",{"type":47,"tag":230,"props":4189,"children":4190},{"style":242},[4191],{"type":52,"value":245},{"type":47,"tag":230,"props":4193,"children":4194},{"style":248},[4195],{"type":52,"value":4196},"sendBulk",{"type":47,"tag":230,"props":4198,"children":4199},{"style":272},[4200],{"type":52,"value":470},{"type":47,"tag":230,"props":4202,"children":4203},{"style":237},[4204],{"type":52,"value":4205},"emails",{"type":47,"tag":230,"props":4207,"children":4208},{"style":272},[4209],{"type":52,"value":533},{"type":47,"tag":230,"props":4211,"children":4212},{"style":242},[4213],{"type":52,"value":538},{"type":47,"tag":230,"props":4215,"children":4217},{"class":232,"line":4216},22,[4218],{"type":47,"tag":230,"props":4219,"children":4220},{"style":242},[4221],{"type":52,"value":547},{"type":47,"tag":230,"props":4223,"children":4225},{"class":232,"line":4224},23,[4226,4230],{"type":47,"tag":230,"props":4227,"children":4228},{"style":237},[4229],{"type":52,"value":556},{"type":47,"tag":230,"props":4231,"children":4232},{"style":242},[4233],{"type":52,"value":538},{"type":47,"tag":87,"props":4235,"children":4237},{"id":4236},"combining-flow-control",[4238],{"type":52,"value":4239},"Combining Flow Control",{"type":47,"tag":212,"props":4241,"children":4243},{"id":4242},"example-fair-ai-processing",[4244],{"type":52,"value":4245},"Example: Fair AI Processing",{"type":47,"tag":219,"props":4247,"children":4249},{"className":221,"code":4248,"language":223,"meta":224,"style":224},"inngest.createFunction(\n  {\n    id: \"ai-image-processing\",\n    \u002F\u002F Global throttling for API limits\n    throttle: {\n      limit: 50,\n      period: \"60s\",\n      key: `\"gpu-cluster\"`\n    },\n    \u002F\u002F Per-user concurrency for fairness\n    concurrency: [\n      {\n        key: \"event.data.user_id\",\n        limit: 3\n      }\n    ],\n    \u002F\u002F VIP users get priority\n    priority: {\n      run: \"event.data.plan == 'pro' ? 60 : 0\"\n    },\n    triggers: [{ event: \"ai\u002Fimage.generate\" }]\n  },\n  async ({ event, step }) => {\n    \u002F\u002F Combines multiple flow controls for optimal resource usage\n  }\n);\n",[4250],{"type":47,"tag":195,"props":4251,"children":4252},{"__ignoreMap":224},[4253,4272,4279,4307,4315,4330,4350,4377,4402,4409,4417,4432,4439,4466,4482,4489,4500,4508,4523,4547,4554,4602,4609,4644,4653,4661],{"type":47,"tag":230,"props":4254,"children":4255},{"class":232,"line":233},[4256,4260,4264,4268],{"type":47,"tag":230,"props":4257,"children":4258},{"style":237},[4259],{"type":52,"value":8},{"type":47,"tag":230,"props":4261,"children":4262},{"style":242},[4263],{"type":52,"value":245},{"type":47,"tag":230,"props":4265,"children":4266},{"style":248},[4267],{"type":52,"value":251},{"type":47,"tag":230,"props":4269,"children":4270},{"style":237},[4271],{"type":52,"value":256},{"type":47,"tag":230,"props":4273,"children":4274},{"class":232,"line":259},[4275],{"type":47,"tag":230,"props":4276,"children":4277},{"style":242},[4278],{"type":52,"value":265},{"type":47,"tag":230,"props":4280,"children":4281},{"class":232,"line":268},[4282,4286,4290,4294,4299,4303],{"type":47,"tag":230,"props":4283,"children":4284},{"style":272},[4285],{"type":52,"value":275},{"type":47,"tag":230,"props":4287,"children":4288},{"style":242},[4289],{"type":52,"value":280},{"type":47,"tag":230,"props":4291,"children":4292},{"style":242},[4293],{"type":52,"value":285},{"type":47,"tag":230,"props":4295,"children":4296},{"style":288},[4297],{"type":52,"value":4298},"ai-image-processing",{"type":47,"tag":230,"props":4300,"children":4301},{"style":242},[4302],{"type":52,"value":296},{"type":47,"tag":230,"props":4304,"children":4305},{"style":242},[4306],{"type":52,"value":301},{"type":47,"tag":230,"props":4308,"children":4309},{"class":232,"line":304},[4310],{"type":47,"tag":230,"props":4311,"children":4312},{"style":439},[4313],{"type":52,"value":4314},"    \u002F\u002F Global throttling for API limits\n",{"type":47,"tag":230,"props":4316,"children":4317},{"class":232,"line":27},[4318,4322,4326],{"type":47,"tag":230,"props":4319,"children":4320},{"style":272},[4321],{"type":52,"value":1277},{"type":47,"tag":230,"props":4323,"children":4324},{"style":242},[4325],{"type":52,"value":280},{"type":47,"tag":230,"props":4327,"children":4328},{"style":242},[4329],{"type":52,"value":432},{"type":47,"tag":230,"props":4331,"children":4332},{"class":232,"line":381},[4333,4337,4341,4346],{"type":47,"tag":230,"props":4334,"children":4335},{"style":272},[4336],{"type":52,"value":1293},{"type":47,"tag":230,"props":4338,"children":4339},{"style":242},[4340],{"type":52,"value":280},{"type":47,"tag":230,"props":4342,"children":4343},{"style":317},[4344],{"type":52,"value":4345}," 50",{"type":47,"tag":230,"props":4347,"children":4348},{"style":242},[4349],{"type":52,"value":301},{"type":47,"tag":230,"props":4351,"children":4352},{"class":232,"line":390},[4353,4357,4361,4365,4369,4373],{"type":47,"tag":230,"props":4354,"children":4355},{"style":272},[4356],{"type":52,"value":1319},{"type":47,"tag":230,"props":4358,"children":4359},{"style":242},[4360],{"type":52,"value":280},{"type":47,"tag":230,"props":4362,"children":4363},{"style":242},[4364],{"type":52,"value":285},{"type":47,"tag":230,"props":4366,"children":4367},{"style":288},[4368],{"type":52,"value":1332},{"type":47,"tag":230,"props":4370,"children":4371},{"style":242},[4372],{"type":52,"value":296},{"type":47,"tag":230,"props":4374,"children":4375},{"style":242},[4376],{"type":52,"value":301},{"type":47,"tag":230,"props":4378,"children":4379},{"class":232,"line":435},[4380,4384,4388,4392,4397],{"type":47,"tag":230,"props":4381,"children":4382},{"style":272},[4383],{"type":52,"value":1378},{"type":47,"tag":230,"props":4385,"children":4386},{"style":242},[4387],{"type":52,"value":280},{"type":47,"tag":230,"props":4389,"children":4390},{"style":242},[4391],{"type":52,"value":993},{"type":47,"tag":230,"props":4393,"children":4394},{"style":288},[4395],{"type":52,"value":4396},"\"gpu-cluster\"",{"type":47,"tag":230,"props":4398,"children":4399},{"style":242},[4400],{"type":52,"value":4401},"`\n",{"type":47,"tag":230,"props":4403,"children":4404},{"class":232,"line":445},[4405],{"type":47,"tag":230,"props":4406,"children":4407},{"style":242},[4408],{"type":52,"value":1408},{"type":47,"tag":230,"props":4410,"children":4411},{"class":232,"line":541},[4412],{"type":47,"tag":230,"props":4413,"children":4414},{"style":439},[4415],{"type":52,"value":4416},"    \u002F\u002F Per-user concurrency for fairness\n",{"type":47,"tag":230,"props":4418,"children":4419},{"class":232,"line":550},[4420,4424,4428],{"type":47,"tag":230,"props":4421,"children":4422},{"style":272},[4423],{"type":52,"value":310},{"type":47,"tag":230,"props":4425,"children":4426},{"style":242},[4427],{"type":52,"value":280},{"type":47,"tag":230,"props":4429,"children":4430},{"style":237},[4431],{"type":52,"value":656},{"type":47,"tag":230,"props":4433,"children":4434},{"class":232,"line":788},[4435],{"type":47,"tag":230,"props":4436,"children":4437},{"style":242},[4438],{"type":52,"value":664},{"type":47,"tag":230,"props":4440,"children":4441},{"class":232,"line":824},[4442,4446,4450,4454,4458,4462],{"type":47,"tag":230,"props":4443,"children":4444},{"style":272},[4445],{"type":52,"value":672},{"type":47,"tag":230,"props":4447,"children":4448},{"style":242},[4449],{"type":52,"value":280},{"type":47,"tag":230,"props":4451,"children":4452},{"style":242},[4453],{"type":52,"value":285},{"type":47,"tag":230,"props":4455,"children":4456},{"style":288},[4457],{"type":52,"value":685},{"type":47,"tag":230,"props":4459,"children":4460},{"style":242},[4461],{"type":52,"value":296},{"type":47,"tag":230,"props":4463,"children":4464},{"style":242},[4465],{"type":52,"value":301},{"type":47,"tag":230,"props":4467,"children":4468},{"class":232,"line":833},[4469,4473,4477],{"type":47,"tag":230,"props":4470,"children":4471},{"style":272},[4472],{"type":52,"value":701},{"type":47,"tag":230,"props":4474,"children":4475},{"style":242},[4476],{"type":52,"value":280},{"type":47,"tag":230,"props":4478,"children":4479},{"style":317},[4480],{"type":52,"value":4481}," 3\n",{"type":47,"tag":230,"props":4483,"children":4484},{"class":232,"line":842},[4485],{"type":47,"tag":230,"props":4486,"children":4487},{"style":242},[4488],{"type":52,"value":718},{"type":47,"tag":230,"props":4490,"children":4491},{"class":232,"line":850},[4492,4496],{"type":47,"tag":230,"props":4493,"children":4494},{"style":237},[4495],{"type":52,"value":726},{"type":47,"tag":230,"props":4497,"children":4498},{"style":242},[4499],{"type":52,"value":301},{"type":47,"tag":230,"props":4501,"children":4502},{"class":232,"line":2917},[4503],{"type":47,"tag":230,"props":4504,"children":4505},{"style":439},[4506],{"type":52,"value":4507},"    \u002F\u002F VIP users get priority\n",{"type":47,"tag":230,"props":4509,"children":4510},{"class":232,"line":2926},[4511,4515,4519],{"type":47,"tag":230,"props":4512,"children":4513},{"style":272},[4514],{"type":52,"value":2497},{"type":47,"tag":230,"props":4516,"children":4517},{"style":242},[4518],{"type":52,"value":280},{"type":47,"tag":230,"props":4520,"children":4521},{"style":242},[4522],{"type":52,"value":432},{"type":47,"tag":230,"props":4524,"children":4525},{"class":232,"line":2934},[4526,4530,4534,4538,4543],{"type":47,"tag":230,"props":4527,"children":4528},{"style":272},[4529],{"type":52,"value":2521},{"type":47,"tag":230,"props":4531,"children":4532},{"style":242},[4533],{"type":52,"value":280},{"type":47,"tag":230,"props":4535,"children":4536},{"style":242},[4537],{"type":52,"value":285},{"type":47,"tag":230,"props":4539,"children":4540},{"style":288},[4541],{"type":52,"value":4542},"event.data.plan == 'pro' ? 60 : 0",{"type":47,"tag":230,"props":4544,"children":4545},{"style":242},[4546],{"type":52,"value":1839},{"type":47,"tag":230,"props":4548,"children":4549},{"class":232,"line":4126},[4550],{"type":47,"tag":230,"props":4551,"children":4552},{"style":242},[4553],{"type":52,"value":1408},{"type":47,"tag":230,"props":4555,"children":4556},{"class":232,"line":4136},[4557,4561,4565,4569,4573,4577,4581,4585,4590,4594,4598],{"type":47,"tag":230,"props":4558,"children":4559},{"style":272},[4560],{"type":52,"value":332},{"type":47,"tag":230,"props":4562,"children":4563},{"style":242},[4564],{"type":52,"value":280},{"type":47,"tag":230,"props":4566,"children":4567},{"style":237},[4568],{"type":52,"value":341},{"type":47,"tag":230,"props":4570,"children":4571},{"style":242},[4572],{"type":52,"value":346},{"type":47,"tag":230,"props":4574,"children":4575},{"style":272},[4576],{"type":52,"value":351},{"type":47,"tag":230,"props":4578,"children":4579},{"style":242},[4580],{"type":52,"value":280},{"type":47,"tag":230,"props":4582,"children":4583},{"style":242},[4584],{"type":52,"value":285},{"type":47,"tag":230,"props":4586,"children":4587},{"style":288},[4588],{"type":52,"value":4589},"ai\u002Fimage.generate",{"type":47,"tag":230,"props":4591,"children":4592},{"style":242},[4593],{"type":52,"value":296},{"type":47,"tag":230,"props":4595,"children":4596},{"style":242},[4597],{"type":52,"value":373},{"type":47,"tag":230,"props":4599,"children":4600},{"style":237},[4601],{"type":52,"value":378},{"type":47,"tag":230,"props":4603,"children":4604},{"class":232,"line":4216},[4605],{"type":47,"tag":230,"props":4606,"children":4607},{"style":242},[4608],{"type":52,"value":387},{"type":47,"tag":230,"props":4610,"children":4611},{"class":232,"line":4224},[4612,4616,4620,4624,4628,4632,4636,4640],{"type":47,"tag":230,"props":4613,"children":4614},{"style":394},[4615],{"type":52,"value":397},{"type":47,"tag":230,"props":4617,"children":4618},{"style":242},[4619],{"type":52,"value":402},{"type":47,"tag":230,"props":4621,"children":4622},{"style":405},[4623],{"type":52,"value":351},{"type":47,"tag":230,"props":4625,"children":4626},{"style":242},[4627],{"type":52,"value":412},{"type":47,"tag":230,"props":4629,"children":4630},{"style":405},[4631],{"type":52,"value":417},{"type":47,"tag":230,"props":4633,"children":4634},{"style":242},[4635],{"type":52,"value":422},{"type":47,"tag":230,"props":4637,"children":4638},{"style":394},[4639],{"type":52,"value":427},{"type":47,"tag":230,"props":4641,"children":4642},{"style":242},[4643],{"type":52,"value":432},{"type":47,"tag":230,"props":4645,"children":4647},{"class":232,"line":4646},24,[4648],{"type":47,"tag":230,"props":4649,"children":4650},{"style":439},[4651],{"type":52,"value":4652},"    \u002F\u002F Combines multiple flow controls for optimal resource usage\n",{"type":47,"tag":230,"props":4654,"children":4656},{"class":232,"line":4655},25,[4657],{"type":47,"tag":230,"props":4658,"children":4659},{"style":242},[4660],{"type":52,"value":547},{"type":47,"tag":230,"props":4662,"children":4663},{"class":232,"line":23},[4664,4668],{"type":47,"tag":230,"props":4665,"children":4666},{"style":237},[4667],{"type":52,"value":556},{"type":47,"tag":230,"props":4669,"children":4670},{"style":242},[4671],{"type":52,"value":538},{"type":47,"tag":55,"props":4673,"children":4674},{},[4675,4680],{"type":47,"tag":68,"props":4676,"children":4677},{},[4678],{"type":52,"value":4679},"Pro tip:",{"type":52,"value":4681}," Most production functions benefit from combining 1-3 flow control mechanisms for optimal reliability and performance.",{"type":47,"tag":4683,"props":4684,"children":4685},"style",{},[4686],{"type":52,"value":4687},"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":4689,"total":833},[4690,4710,4723,4735,4748,4763,4778],{"slug":4691,"name":4691,"fn":4692,"description":4693,"org":4694,"tags":4695,"stars":23,"repoUrl":24,"updatedAt":4709},"inngest-agent-evals","build and debug Inngest agent evals","Use when building, migrating, or debugging Agent Evals on Inngest: scoring AI agent or workflow outcomes, deferred scorers, sessions, traces, step experiments, experiment variant attribution, Insights queries, or production eval loops for prompts, models, tools, providers, and agent behavior. Covers TypeScript SDK v4 scoring beta APIs, `scoreMiddleware`, `step.score`, `inngest.score`, `createScorer`, `defer`, `group.experiment`, `experimentRef`, `meta.sessions`, and when to use durable workflow primitives for outcome-based evaluation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4696,4699,4702,4703,4706],{"name":4697,"slug":4698,"type":15},"Agents","agents",{"name":4700,"slug":4701,"type":15},"Evals","evals",{"name":9,"slug":8,"type":15},{"name":4704,"slug":4705,"type":15},"Observability","observability",{"name":4707,"slug":4708,"type":15},"Workflow Automation","workflow-automation","2026-07-12T07:36:51.711641",{"slug":4711,"name":4711,"fn":4712,"description":4713,"org":4714,"tags":4715,"stars":23,"repoUrl":24,"updatedAt":4722},"inngest-agents","build durable AI agent workflows","Use when building durable AI agents or agentic workflows with Inngest and AgentKit, including model calls, tool calls, multi-agent networks, human approval, realtime progress, provider rate limits, crash-safe execution, and Agent Evals handoff. Covers AgentKit, `step.ai`, `step.run`, `step.waitForEvent`, native realtime, and when to use lower-level Inngest primitives instead of an in-memory agent loop. Use `inngest-agent-evals` with this skill when the user wants scoring, sessions, experiments, deferred scorers, or outcome-based evaluation for the agent.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4716,4717,4718,4719],{"name":4697,"slug":4698,"type":15},{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":4720,"slug":4721,"type":15},"LLM","llm","2026-07-12T07:36:45.984181",{"slug":4724,"name":4724,"fn":4725,"description":4726,"org":4727,"tags":4728,"stars":23,"repoUrl":24,"updatedAt":4734},"inngest-api","interact with Inngest REST API","Use when the user explicitly asks for the Inngest REST API v2, raw HTTP, OpenAPI, API docs, API authentication, or an endpoint that the Inngest CLI does not expose. Covers api-docs.inngest.com, llms.txt, the OpenAPI v2 spec, Bearer authentication with API keys or signing keys, production and local base URLs, raw curl\u002Ffetch requests, request-shape discovery, pagination, secret redaction, and when to prefer the `inngest-api-cli` skill instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4729,4730,4733],{"name":21,"slug":22,"type":15},{"name":4731,"slug":4732,"type":15},"REST API","rest-api",{"name":4707,"slug":4708,"type":15},"2026-07-12T07:36:39.364409",{"slug":4736,"name":4736,"fn":4737,"description":4738,"org":4739,"tags":4740,"stars":23,"repoUrl":24,"updatedAt":4747},"inngest-api-cli","operate Inngest API resources via CLI","Use when operating Inngest API resources from the terminal with `npx inngest-cli@latest api`: Cloud\u002Flocal run debugging, event-run lookup, function traces, function invocation, app syncs, webhooks, environments, keys, account checks, and Insights queries. Provides prescriptive command routing for agents: which CLI command to run for a run ID, event ID, app ID, function ID, Cloud environment, API key, missing ID, or potentially mutating operation. Use `inngest-cli` for dev server setup\u002Fgeneral CLI workflows and `inngest-api` only when raw REST API v2 docs or OpenAPI fallback are needed.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4741,4742,4743,4746],{"name":21,"slug":22,"type":15},{"name":17,"slug":18,"type":15},{"name":4744,"slug":4745,"type":15},"CLI","cli",{"name":9,"slug":8,"type":15},"2026-07-12T07:36:47.58183",{"slug":4749,"name":4749,"fn":4750,"description":4751,"org":4752,"tags":4753,"stars":23,"repoUrl":24,"updatedAt":4762},"inngest-brownfield-audit","audit codebases for Inngest integration","Use when analyzing an existing TypeScript or JavaScript codebase to decide where and how to introduce Inngest. Covers repository discovery, framework and package detection, finding durability gaps in HTTP handlers, webhooks, cron jobs, queues, long-running jobs, AI agents, Agent Evals, polling loops, eval loops, and side-effect-heavy code, then producing and implementing an incremental integration plan.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4754,4755,4758,4761],{"name":17,"slug":18,"type":15},{"name":4756,"slug":4757,"type":15},"Code Analysis","code-analysis",{"name":4759,"slug":4760,"type":15},"Engineering","engineering",{"name":9,"slug":8,"type":15},"2026-07-12T07:36:55.811247",{"slug":4764,"name":4764,"fn":4765,"description":4766,"org":4767,"tags":4768,"stars":23,"repoUrl":24,"updatedAt":4777},"inngest-cli","configure Inngest CLI and dev server","Use when installing or running the Inngest CLI and Dev Server for local development, local testing, serve endpoint debugging, Docker or Docker Compose setup, MCP configuration, self-hosted `inngest start`, or deployment workflow checks. Covers `inngest dev`, `inngest start`, auto-discovery, config files, environment variables, `@inngest\u002Ftest`, local event sending, platform gotchas, and production\u002Fself-hosted server flags.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4769,4770,4773,4774],{"name":4744,"slug":4745,"type":15},{"name":4771,"slug":4772,"type":15},"Docker","docker",{"name":9,"slug":8,"type":15},{"name":4775,"slug":4776,"type":15},"Local Development","local-development","2026-07-12T07:36:40.694652",{"slug":4779,"name":4779,"fn":4780,"description":4781,"org":4782,"tags":4783,"stars":23,"repoUrl":24,"updatedAt":4790},"inngest-durable-functions","build durable and retry-safe functions","Use when building functions that must survive process crashes, retry automatically on failure, run on a schedule, react to events, or maintain state across infrastructure failures — e.g., webhook handlers that drop events, flaky cron jobs, background jobs that fail mid-execution, or workflows that need to resume where they left off. Covers Inngest function configuration, triggers (events, cron, invoke), step execution and memoization, idempotency, cancellation, error handling, retries, logging, and observability.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4784,4785,4788,4789],{"name":17,"slug":18,"type":15},{"name":4786,"slug":4787,"type":15},"Backend","backend",{"name":9,"slug":8,"type":15},{"name":4707,"slug":4708,"type":15},"2026-07-12T07:36:57.141023",{"items":4792,"total":833},[4793,4801,4808,4814,4821,4828,4835,4842,4854,4861,4877,4892],{"slug":4691,"name":4691,"fn":4692,"description":4693,"org":4794,"tags":4795,"stars":23,"repoUrl":24,"updatedAt":4709},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4796,4797,4798,4799,4800],{"name":4697,"slug":4698,"type":15},{"name":4700,"slug":4701,"type":15},{"name":9,"slug":8,"type":15},{"name":4704,"slug":4705,"type":15},{"name":4707,"slug":4708,"type":15},{"slug":4711,"name":4711,"fn":4712,"description":4713,"org":4802,"tags":4803,"stars":23,"repoUrl":24,"updatedAt":4722},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4804,4805,4806,4807],{"name":4697,"slug":4698,"type":15},{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":4720,"slug":4721,"type":15},{"slug":4724,"name":4724,"fn":4725,"description":4726,"org":4809,"tags":4810,"stars":23,"repoUrl":24,"updatedAt":4734},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4811,4812,4813],{"name":21,"slug":22,"type":15},{"name":4731,"slug":4732,"type":15},{"name":4707,"slug":4708,"type":15},{"slug":4736,"name":4736,"fn":4737,"description":4738,"org":4815,"tags":4816,"stars":23,"repoUrl":24,"updatedAt":4747},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4817,4818,4819,4820],{"name":21,"slug":22,"type":15},{"name":17,"slug":18,"type":15},{"name":4744,"slug":4745,"type":15},{"name":9,"slug":8,"type":15},{"slug":4749,"name":4749,"fn":4750,"description":4751,"org":4822,"tags":4823,"stars":23,"repoUrl":24,"updatedAt":4762},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4824,4825,4826,4827],{"name":17,"slug":18,"type":15},{"name":4756,"slug":4757,"type":15},{"name":4759,"slug":4760,"type":15},{"name":9,"slug":8,"type":15},{"slug":4764,"name":4764,"fn":4765,"description":4766,"org":4829,"tags":4830,"stars":23,"repoUrl":24,"updatedAt":4777},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4831,4832,4833,4834],{"name":4744,"slug":4745,"type":15},{"name":4771,"slug":4772,"type":15},{"name":9,"slug":8,"type":15},{"name":4775,"slug":4776,"type":15},{"slug":4779,"name":4779,"fn":4780,"description":4781,"org":4836,"tags":4837,"stars":23,"repoUrl":24,"updatedAt":4790},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4838,4839,4840,4841],{"name":17,"slug":18,"type":15},{"name":4786,"slug":4787,"type":15},{"name":9,"slug":8,"type":15},{"name":4707,"slug":4708,"type":15},{"slug":4843,"name":4843,"fn":4844,"description":4845,"org":4846,"tags":4847,"stars":23,"repoUrl":24,"updatedAt":4853},"inngest-events","design event-driven workflows","Use when designing event-driven workflows, decoupling services, implementing fan-out patterns (one trigger, many downstream handlers), implementing idempotent event handling with IDs (24-hour dedupe window), or handling at-least-once delivery from external sources like Stripe webhooks. Covers Inngest event schema, payload format, naming conventions, IDs for idempotency, the ts param, fan-out patterns, and system events like inngest\u002Ffunction.failed.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4848,4851,4852],{"name":4849,"slug":4850,"type":15},"Data Pipeline","data-pipeline",{"name":9,"slug":8,"type":15},{"name":4707,"slug":4708,"type":15},"2026-07-12T07:36:44.685364",{"slug":4,"name":4,"fn":5,"description":6,"org":4855,"tags":4856,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4857,4858,4859,4860],{"name":21,"slug":22,"type":15},{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"slug":4862,"name":4862,"fn":4863,"description":4864,"org":4865,"tags":4866,"stars":23,"repoUrl":24,"updatedAt":4876},"inngest-middleware","add middleware to Inngest durable functions","Use when adding cross-cutting concerns to durable functions — structured logging or tracing across all functions, error tracking with Sentry, payload encryption for sensitive data, dependency injection of clients (DB, Stripe, etc.) into function handlers, custom telemetry, or behavior that should apply uniformly across many functions. Covers Inngest middleware lifecycle, creating custom middleware, dependencyInjectionMiddleware, @inngest\u002Fmiddleware-encryption, @inngest\u002Fmiddleware-sentry, and custom middleware patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4867,4868,4869,4872,4873],{"name":4759,"slug":4760,"type":15},{"name":9,"slug":8,"type":15},{"name":4870,"slug":4871,"type":15},"Middleware","middleware",{"name":4704,"slug":4705,"type":15},{"name":4874,"slug":4875,"type":15},"Sentry","sentry","2026-07-12T07:36:50.127999",{"slug":4878,"name":4878,"fn":4879,"description":4880,"org":4881,"tags":4882,"stars":23,"repoUrl":24,"updatedAt":4891},"inngest-realtime","stream durable workflow updates to UI","Use when streaming durable workflow updates to a UI in real time — live order status pages that animate as steps complete, AI agent token streaming from a function to the browser, log tailing for long-running jobs, or human-in-the-loop approval flows that publish a prompt and wait for a user reply. Covers Inngest v4 native realtime: defining typed channels, publishing from inside step.run, minting subscription tokens via server actions, and consuming the stream from React\u002FNext.js client components.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4883,4884,4887,4888],{"name":17,"slug":18,"type":15},{"name":4885,"slug":4886,"type":15},"Frontend","frontend",{"name":9,"slug":8,"type":15},{"name":4889,"slug":4890,"type":15},"Real-time","real-time","2026-07-12T07:36:48.895092",{"slug":4893,"name":4893,"fn":4894,"description":4895,"org":4896,"tags":4897,"stars":23,"repoUrl":24,"updatedAt":4903},"inngest-setup","build durable TypeScript workflows","Use when adding durable execution to a TypeScript project — building retry-safe webhook handlers, background jobs that survive crashes, scheduled tasks, or long-running workflows that outlive a single request. Covers Inngest SDK installation, client config, environment variables, serve endpoints (Next.js, Express, Hono, Fastify), connect-as-worker mode, and the local dev server.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4898,4899,4900,4901],{"name":17,"slug":18,"type":15},{"name":4786,"slug":4787,"type":15},{"name":9,"slug":8,"type":15},{"name":4902,"slug":223,"type":15},"TypeScript","2026-07-12T07:36:42.004122"]