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): class Environment(object, metaclass=ABCMeta):
_DEBUG_SERVER = False
_AUTH_EXPIRATION_TIME = timedelta(minutes=30) _AUTH_EXPIRATION_TIME = timedelta(minutes=30)
_testing = False _testing = False
@ -32,8 +31,5 @@ class Environment(object, metaclass=ABCMeta):
def get_config(self) -> EnvironmentConfig: def get_config(self) -> EnvironmentConfig:
return self._config return self._config
def is_debug(self):
return self._DEBUG_SERVER
def get_auth_expiration_time(self): def get_auth_expiration_time(self):
return self._AUTH_EXPIRATION_TIME 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}." f"{config_options.key_path}."
) )
if env_singleton.env.is_debug(): http_server = WSGIServer(
app.run( ("0.0.0.0", ISLAND_PORT),
host="0.0.0.0", app,
debug=True, certfile=config_options.crt_path,
ssl_context=(config_options.crt_path, config_options.key_path), keyfile=config_options.key_path,
) log=logger,
else: error_log=logger,
http_server = WSGIServer( )
("0.0.0.0", ISLAND_PORT), _log_init_info()
app, http_server.serve_forever()
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() bootloader_server_thread.join()