Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)48k · #4951

inngest

Skill này làm gì

Inngest giúp tạo các tác vụ nền, quy trình nhiều bước và các tiến trình liên tục mà không cần quản lý hàng đợi hay máy chủ phụ.

Khi nào nên dùng

  • ✓Khi bạn cần một tác vụ tự động chạy vào một thời điểm cụ thể.
  • ✓Khi một sự kiện (như người dùng mới đăng ký) cần kích hoạt một chuỗi hành động.
  • ✓Khi bạn muốn ứng dụng xử lý nhiều yêu cầu cùng lúc mà không bị sập.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/inngest/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/inngest/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một luồng gửi email chào mừng khi người dùng đăng ký, rồi gửi các mẹo sử dụng sau 24 giờ.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn định nghĩa các bước mà tác vụ cần thực hiện. Inngest đảm bảo mỗi bước được thực thi và kết quả được lưu lại. Nó cũng xử lý việc thử lại nếu có lỗi và cho phép tạm dừng thực sự mà không làm nghẽn hệ thống.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Inngest Integration

Inngest expert for serverless-first background jobs, event-driven workflows, and durable execution without managing queues or workers.

Principles

  • Events are the primitive - everything triggers from events, not queues
  • Steps are your checkpoints - each step result is durably stored
  • Sleep is not a hack - Inngest sleeps are real, not blocking threads
  • Retries are automatic - but you control the policy
  • Functions are just HTTP handlers - deploy anywhere that serves HTTP
  • Concurrency is a first-class concern - protect downstream services
  • Idempotency keys prevent duplicates - use them for critical operations
  • Fan-out is built-in - one event can trigger many functions

Capabilities

  • inngest-functions
  • event-driven-workflows
  • step-functions
  • serverless-background-jobs
  • durable-sleep
  • fan-out-patterns
  • concurrency-control
  • scheduled-functions

Scope

  • redis-queues -> bullmq-specialist
  • serverless-queues -> upstash-qstash
  • workflow-orchestration -> temporal-craftsman
  • message-streaming -> event-architect
  • infrastructure -> infra-architect

Tooling

Core

  • inngest
  • inngest-cli

Frameworks

  • nextjs
  • express
  • hono
  • remix
  • sveltekit

Deployment

  • vercel
  • cloudflare-workers
  • netlify
  • railway
  • fly-io

Patterns

  • step-functions
  • event-fan-out
  • scheduled-cron
  • webhook-handling

Patterns

Basic Function Setup

Inngest function with typed events in Next.js

When to use: Starting with Inngest in any Next.js project

// lib/inngest/client.ts import { Inngest } from 'inngest';

export const inngest = new Inngest({ id: 'my-app', schemas: new EventSchemas().fromRecord<Events>(), });

// Define your events with types type Events = { 'user/signed.up': { data: { userId: string; email: string } }; 'order/placed': { data: { orderId: string; total: number } }; };

// lib/inngest/functions.ts import { inngest } from './client';

export const sendWelcomeEmail = inngest.createFunction( { id: 'send-welcome-email' }, { event: 'user/signed.up' }, async ({ event, step }) => { // Step 1: Get user details const user = await step.run('get-user', async () => { return await db.users.findUnique({ where: { id: event.data.userId } }); });

// Step 2: Send welcome email
await step.run('send-email', async () => {
  await resend.emails.send({
    to: user.email,
    subject: 'Welcome!',
    template: 'welcome',
  });
});

// Step 3: Wait 24 hours, then send tips
await step.sleep('wait-for-tips', '24h');

await step.run('send-tips', async () => {
  await resend.emails.send({
    to: user.email,
    subject: 'Getting Started Tips',
    template: 'tips',
  });
});

} );

// app/api/inngest/route.ts (Next.js App Router) import { serve } from 'inngest/next'; import { inngest } from '@/lib/inngest/client'; import { sendWelcomeEmail } from '@/lib/inngest/functions';

export const { GET, POST, PUT } = serve({ client: inngest, functions: [sendWelcomeEmail], });

Multi-Step Workflow

Complex workflow with parallel steps and error handling

When to use: Processing that involves multiple services or long waits

export const processOrder = inngest.createFunction( { id: 'process-order', retries: 3, concurrency: { limit: 10 }, // Max 10 orders processing at once }, { event: 'order/placed' }, async ({ event, step }) => { const { orderId } = event.data;

// Parallel steps - both run simultaneously
const [inventory, payment] = await Promise.all([
  step.run('check-inventory', () => checkInventory(orderId)),
  step.run('validate-payment', () => validatePayment(orderId)),
]);

if (!inventory.available) {
  // Send event instead of direct call (fan-out pattern)
  await step.sendEvent('notify-backorder', {
    name: 'order/backordered',
    data: { orderId, items: inventory.missing },
  });
  return { status: 'backordered' };
}

// Process payment
const charge = await step.run('charge-payment', async () => {
  return await stripe.charges.create({
    amount: event.data.total,
    customer: payment.customerId,
  });
});

// Ship order
await step.run('ship-order', () => fulfillment.ship(orderId));

return { status: 'completed', chargeId: charge.id };

} );

Scheduled/Cron Functions

Functions that run on a schedule

…

Câu hỏi thường gặp

“Events” là gì?

Sự kiện là các thông báo cho biết một điều gì đó đã xảy ra, ví dụ “người dùng đã đăng ký” hoặc “đơn hàng đã được đặt”. Inngest dùng các sự kiện này để bắt đầu hoặc tiếp tục tác vụ.

“Steps” là gì?

Bước là từng phần riêng lẻ của một tác vụ lớn hơn. Inngest đảm bảo mỗi bước được hoàn thành và lưu kết quả, giúp bạn tiếp tục từ chỗ đã dừng nếu có sự cố.

Tôi có thể làm cho tác vụ chờ một khoảng thời gian không?

Có, Inngest cho phép bạn dùng “sleep” để tạm dừng tác vụ trong một khoảng thời gian nhất định (giờ, ngày) mà không tốn tài nguyên máy chủ.

Chi tiết

Mô tả gốc của tác giả

Inngest expert for serverless-first background jobs, event-driven workflows, and durable execution without managing queues or workers.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4951
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự