Astro CMS blog site is 95% static with just a bit of back-end processing. Site is developed under nodejs, and plans are to deploy it on nodejs server as well.
I want to hook sigint, sigterm so that I can gracefully shutdown the back-end processing when the server goes through its shutdown process.
-
Would like to know where to put the signal hooks in the app to accomplish this.
-
Would also like to know just how much time a Centos 9 server, on shutdown, gives a process to exit after sending sigterm, before it just kills the process and proceeds with shutdown. Related, what are my options to block the server shutdown until app related shutdown is complete, in the case that the app takes a long time to clean up.
Searched related questions on this site, googled “astro cms shutdown”, and also Astro official documentation. Couldn’t find any info about how Astro spins up/down to find the proper place to install the hooks.