Explorar o código

fix(kernel): handle SIGTERM graceful shutdown

Nicolas Giard %!s(int64=3) %!d(string=hai) anos
pai
achega
0425b82c83
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      server/index.js

+ 3 - 0
server/index.js

@@ -38,6 +38,9 @@ WIKI.kernel.init()
 // Register exit handler
 // ----------------------------------------
 
+process.on('SIGTERM', () => {
+  WIKI.kernel.shutdown()
+})
 process.on('SIGINT', () => {
   WIKI.kernel.shutdown()
 })