-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Remove sigkill and sigint handler added to overcome a long closed issue with node #4635
Conversation
fixes: 4593 I think that this is proper hygiene Wait a tick before process exit, not for any particular reason than it seems defensive?
Codecov Report
@@ Coverage Diff @@
## master #4635 +/- ##
==========================================
- Coverage 92.64% 92.62% -0.03%
==========================================
Files 119 119
Lines 8567 8567
==========================================
- Hits 7937 7935 -2
- Misses 630 632 +2
Continue to review full report at Codecov.
|
I think this is better than
|
…/node#2642 has been fixed so server will just do the right thing now.
excellent question @dplewis! Yes, if I just rip it all out, it just works as I'd expect. So what do I expect? I expect that when I start my server I can see the connection count on the mongo server increase. When I then kill the server with ctrl-c or with So I think that the right answer is to just rip it all out. Pr update coming. Am I missing something? |
Some adapters still need the handleShutdown IIRC |
@acinader we actually need the shutdown handler here as some external adapters are expecting it to be called to do some cleanup. Removing it is a bad idea :) also the liveQuery should register it’s own shutdown handler if that’s the issue at hand |
k will go back to the drawing board and figure out how to get the livequery server to shutdown. |
Probably in a similar way to the parse server. Is it when it’s run stand alone that it’s not shutting down? Do you have a code example? |
@flovilmart this is just when I am running the livequery server in the same process as parse-server which I do for development. My config:
I'm starting the server with
It makes sense to me that the server is never shutting down since nothing tells the live-query server to stop. The live query server does not have a stop or shutdown method and I've played around a little with how to add one, but I haven't figured out yet. I'm sure I can figure it out with some more time and reading. But I'm trying to understand why it would be necessary and if it's really necessary. |
fixes: #4593
rip out all of the
configureListener
code since nodejs/node#2642 has been long resolved.I have confirmed that when parse server receives sigkill or sigint and the server closes, connections to mongo are also closed.
This removes some questionable code, which I can elaborate on if anyone is curious....