Enable code live reload only in debug mode

This commit is contained in:
Julien Duponchelle committed 2015-01-26 09:51:29 +01:00
1 parent c409819382
commit 1bfb201368
2 files changed
+5 -3

No files matched your search

+3 -2
View File
@@ -164,6 +164,7 @@ class Server:
self._loop.run_until_complete(self._run_application(app, ssl_context))
self._signal_handling()
# FIXME: remove it in production or in tests
self._loop.call_later(1, self._reload_hook)
if server_config["debug"] == "true":
log.info("Code live reload is enabled, watching for file changes")
self._loop.call_later(1, self._reload_hook)
self._loop.run_forever()