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

refactor: Add an timeout object to timer return type #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tilacog
Copy link
Contributor

@tilacog tilacog commented Jul 18, 2023

This PR modifies the timer function to return a tuple with the timeout object returned by the call to setInterval alongside the Eventual<number> timer.

Users could then cancel the timer with cancelInterval(timeout) or make it unblock the main Node process with timeout.unref().

This pull request aims to fix an issue where the Indexer Agent tests keep the NodeJS process alive after completing the tests and tearing down resources (like the DB). This causes the process to exit with a non-zero code since the program execution tied to such timers relies on those resources.

@tilacog tilacog requested review from Jannis and fordN July 18, 2023 15:05
@tilacog tilacog changed the title refactor: Add an intervalID to timer return type refactor: Add an timeout object to timer return type Jul 18, 2023
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

Successfully merging this pull request may close these issues.

1 participant