flake8
passed.
JSHint
passed.
Review Request #9568 — Created Feb. 1, 2018 and submitted
We now monitor the config file path with
fsnotifyto see when it
changes. When we get any event or receive the SIGHUP signal, we reload
the configuration and restart the server. This is possible since Golang
1.8 added the ability to stop ahttp.Servergracefully.We also gracefully shut down the server upon receipt of a SIGINT and a
second SIGINT received before graceful shutdown will force-quit the
server.
Ran unit tests.
Tested that the following resulted in configuration being reloaded:
touch config.jsonconfig.jsonrm config.json (results in server crash since there is nokillall -HUP rb-gatewayIn the cases where the server should restart, it did on the correct
port.