Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: setIntervals randomly stopping #114

Open
elijaholmos opened this issue Oct 26, 2022 · 1 comment
Open

bug: setIntervals randomly stopping #114

elijaholmos opened this issue Oct 26, 2022 · 1 comment
Assignees

Comments

@elijaholmos
Copy link
Owner

after doing some digging, this looks like it might be a built-in thing with the nodejs environment. scheduling libraries like node-cron, node-schedule, or bree seem to resolve this issue.

@elijaholmos
Copy link
Owner Author

Long-term, service workers are probably the way to go. Short-term, I'd like to try making my own async "interval" with something like this:

async function handler() {
  await someAsyncFunc();

  await new Promise((resolve) => setTimeout(resolve, 1000));

  handler();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant