소스 검색

fix(kernel): handle SIGTERM graceful shutdown

Nicolas Giard 3 년 전
부모
커밋
0425b82c83
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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()
 })