Skip to content

aiskillstore/marketplace / skills/aayushbaniya2006/inngest-handler

inngest-handler

Verified

Create and manage Inngest functions for reliable background jobs, workflows, and scheduled tasks.

FileKindSize
SKILL.mdskill md4.7 KB
reference.mdmarkdown1.8 KB
skill-report.jsonconfig28.9 KB

reference.md

View on GitHub
# Inngest Reference

## File Structure
-   **Client**: `src/lib/inngest/client.ts`
-   **Registry**: `src/lib/inngest/functions/index.ts`
-   **Definitions**: `src/lib/inngest/functions/[domain]/[action].ts`

## Code Snippets

### Basic Step
```typescript
const result = await step.run("step-id", async () => {
  return await db.query();
});
```

### Sleep (Delay)
```typescript
// Wait for time
await step.sleep("wait-10m", "10m");

// Wait until date
await step.sleepUntil("wait-for-launch", new Date("2025-01-01"));
```

### Wait For Event
```typescript
const event = await step.waitForEvent("wait-approval", {
  event: "app/approval.received",
  match: "data.proposalId", // Correlate events
  timeout: "3d",
  ifExpression: "event.data.approved == true" // Optional condition
});
```

### Send Event
```typescript
await step.sendEvent("broadcast", [
  { name: "user.notify", data: { msg: "Hello" } },
  { name: "analytics.track", data: { event: "ping" } }
]);
```

### Invoke Other Function
```typescript
const result = await step.invoke("call-worker", {
  function: require("./worker").workerFn,
  data: { jobId: 123 }
});
```

### Config Object
```typescript
{
  id: "function-id",
  concurrency: { limit: 5, key: "event.data.accountId" },
  rateLimit: { limit: 100, period: "1h" },
  debounce: { period: "1m", key: "event.data.id" },
  priority: { run: "event.data.isVip ? 100 : 0" },
  retries: 3, // 0 to disable
  cancelOn: [{ event: "app/process.cancel", match: "data.id" }],
  onFailure: async ({ error, step }) => { ... }
}
```

### Error Handling
```typescript
import { NonRetriableError } from "inngest";

// Stop retrying immediately
throw new NonRetriableError("Config missing");

// Retry logic is automatic for standard Errors
throw new Error("API unavailable"); // Will retry
```
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall