← All articles

Workers are the fastest-adopted runtime in Kestrel history

Ines Okafor · 1 min read

Background workers launched six weeks ago. They are now running in more than ten thousand projects, faster than any runtime we have shipped.

What they're used for

  1. Sending email after a checkout, without holding the response

  2. Re-indexing search after a content change

  3. Running evaluation suites for model prompts overnight

worker.ts
import { worker } from "@kestrel/workers";

export default worker("reindex", async (job) => {
  const doc = await job.data<{ id: string }>();
  await search.index(doc.id);
});

0 comments

  • Be the first to comment.