nitrojs / nitrojs/nitro

Sleep until (for Task API)

Open
#2,258 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement v2
Dominant language
TypeScript
Stars
11.2k
Forks
899
Avg merge
2d 24m
Merged PRs (30d)
40

Description

Describe the feature

Inspired by Inngest. https://www.inngest.com/docs/reference/functions/step-sleep-until

Use case example:
Create a todo with a reminder datetime. Run task at date time to send reminder.

export default inngest.createFunction(
  { id: "send-scheduled-reminder" },
  { event: "app/reminder.scheduled" },
  async ({ event, step }) => {
    const d = new Date(event.data.remind_at);
    await step.sleepUntil("wait-for-the-date", d);
    // Do something else
  }
);
Additional information
  • Would you be willing to help implement this feature?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names the Task API but no repository files or tests. Start by locating the Task API entry point and compare its behavior with the linked Inngest sleepUntil reference; done means a task can pause until a supplied reminder datetime and resume for the next action.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.