Skip to content

v0.8.0

Choose a tag to compare

@tonyhb tonyhb released this 10 Nov 20:37
· 1115 commits to main since this release

v0.8.0: Steps

This release of the SDK adds step functions to your serverless event-driven code. Using the new tools, you can create steps, sleep, and coordinate between events in your regular serverless functions hosted on any platform. For example:

import { createStepFunction } from "inngest";

const logic = createStepFunction("My complex logic", "user/created", ({ event, tools }) => {
  const to = event.user.email;

  tools.run("Send welcome email", () => {
    // This step will run and retry independently of the rest of the code if it errors.
    email({ to, type: "welcome" });
  });

  tools.sleep("24h");

  tools.run("Send followup email", () => {
    email({ to, type: "followup" });
  });
});

Learn more in our patterns or docs!