(signal: string)
| 8676 | */ |
| 8677 | private setupShutdownHandlers(): void { |
| 8678 | const gracefulShutdown = async (signal: string) => { |
| 8679 | logger.info({ signal }, 'Received shutdown signal, starting graceful shutdown'); |
| 8680 | await this.stop(); |
| 8681 | process.exit(0); |
| 8682 | }; |
| 8683 | |
| 8684 | process.on("SIGTERM", () => gracefulShutdown("SIGTERM")); |
| 8685 | process.on("SIGINT", () => gracefulShutdown("SIGINT")); |