firebase/snippets-node

[solution-scheduled-backups] Shutdown cleanly when asked to?

naseemkullah opened this issue · 2 comments

My colleague has mentioned that:

It's usually necessary to add process.on('SIGINT', () => process.exit());
to have the server shutdown cleanly when asked to. You can test by running the process in a > docker container with -it and using CTRL+C to ask it to stop.

Are there any reasons to not add this to the app engine service? If not I could make a PR.

@naseemkullah sorry for the slow response. As far as I know there's no need to add this to AppEngine code because AppEngine manages your application lifecycle for you. I haven't seen this in other AppEngine samples so I don't think we should do anything different here.

However I am FAR from an AppEngine expert so if you can point me to an example where someone recommends doing this I would be happy to change my mind. For now going to close this issue since I believe everything is as-intended.

No worries at all @samtstern , thanks for confirming