flake8
passed.
JSHint
passed.
Review Request #9568 — Created Feb. 1, 2018 and submitted
We now monitor the config file path with
fsnotify
to 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.Server
gracefully.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.json
config.json
rm config.json
(results in server crash since there is nokillall -HUP rb-gateway
In the cases where the server should restart, it did on the correct
port.