-
Notifications
You must be signed in to change notification settings - Fork 32
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
Perform graceful termination on SIGINT or SIGTERM signals #729
Conversation
} | ||
process.exit(0) | ||
}) | ||
import('exit-hook').then(({ asyncExitHook }) => asyncExitHook(end, { wait: 5000 })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I have a number of issues here. We shouldn't be using esm-only modules, as our stuff is, for now, still authored in CJS. import
is async, so this is a bit wonky here, and may present some funky / non-deterministic scenarios during testing.
Moreover, we will not be adding any new libraries by Sindre moving forward after his actions during the CJS/ESM debacle. (We'll eventually phase the ones still in use.) Finally, I'm not sure what this is really buying us here, and I'm much more inclined to just attempt to handle signals as necessary (or simply use process.on('exit', fn)
if possible).
@lpsinger did you still want to look at this? |
Yes, this is still a serious problem for a project. |
Ok! Just in case you missed it from architect/architect#1479 (comment):
I've got a short window this morning, I'll take a quick look at an implementation in another PR. |
→ #732 |
Best effort attempt at fixing this (within Arc's scope / capabilities) live in v11.0.8! |
Thank you for helping out! ✨
We really appreciate your commitment to improving Architect
To maintain a high standard of quality in our releases, before merging every pull request we ask that you've completed the following:
main
npm it
from the repo root)readme.md
, help docs, inline docs & comments, etc.)changelog.md
Please also be sure to completed the CLA (if you haven't already).
Learn more about contributing to Architect here.
Thanks again!