Island: Remove Environment.is_debug()

Environment.is_debug() is always False.
This commit is contained in:
Mike Salvatore 2021-11-19 08:27:44 -05:00
parent c4d7bf7030
commit e98aa81645
2 changed files with 10 additions and 21 deletions

View File

@ -12,7 +12,6 @@ logger = logging.getLogger(__name__)
class Environment(object, metaclass=ABCMeta):
_DEBUG_SERVER = False
_AUTH_EXPIRATION_TIME = timedelta(minutes=30)
_testing = False
@ -32,8 +31,5 @@ class Environment(object, metaclass=ABCMeta):
def get_config(self) -> EnvironmentConfig:
return self._config
def is_debug(self):
return self._DEBUG_SERVER
def get_auth_expiration_time(self):
return self._AUTH_EXPIRATION_TIME

View File

@ -146,23 +146,16 @@ def _start_island_server(should_setup_only, config_options: IslandConfigOptions)
f"{config_options.key_path}."
)
if env_singleton.env.is_debug():
app.run(
host="0.0.0.0",
debug=True,
ssl_context=(config_options.crt_path, config_options.key_path),
)
else:
http_server = WSGIServer(
("0.0.0.0", ISLAND_PORT),
app,
certfile=config_options.crt_path,
keyfile=config_options.key_path,
log=logger,
error_log=logger,
)
_log_init_info()
http_server.serve_forever()
http_server = WSGIServer(
("0.0.0.0", ISLAND_PORT),
app,
certfile=config_options.crt_path,
keyfile=config_options.key_path,
log=logger,
error_log=logger,
)
_log_init_info()
http_server.serve_forever()
bootloader_server_thread.join()