Signal trapping for easy shutdown without killing backend container
This commit is contained in:
parent
bb2e458ef0
commit
4f7489e207
|
@ -35,6 +35,9 @@ module Backend
|
|||
|
||||
# Run the backend
|
||||
def run : self
|
||||
Signal::INT.trap { exit }
|
||||
Signal::TERM.trap { exit }
|
||||
|
||||
{% if flag?(:development) %}
|
||||
Log.warn { "Backend is running in development mode! Do not use this in production!" }
|
||||
{% end %}
|
||||
|
|
Loading…
Reference in a new issue