use Process.on_terminate to support SIGTERM termination. (#685)

This commit is contained in:
Abdullah Alhusaini 2024-07-25 12:17:35 +03:00 committed by GitHub
parent 1d46fd17d7
commit 0afbd129f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ module Kemal
end end
private def self.setup_trap_signal private def self.setup_trap_signal
Process.on_interrupt do Process.on_terminate do
log "#{Kemal.config.app_name} is going to take a rest!" if Kemal.config.shutdown_message log "#{Kemal.config.app_name} is going to take a rest!" if Kemal.config.shutdown_message
Kemal.stop Kemal.stop
exit exit