island: Remove unused mongo_url from BootloaderHttpServer constructor

This commit is contained in:
Mike Salvatore 2021-06-03 11:09:07 -04:00
parent 4f97be59c3
commit ac407bf48a
2 changed files with 4 additions and 6 deletions

View File

@ -92,7 +92,7 @@ def _start_island_server(should_setup_only, config_options: IslandConfigOptions)
logger.warning("Setup only flag passed. Exiting.") logger.warning("Setup only flag passed. Exiting.")
return return
bootloader_server_thread = _start_bootloader_server(MONGO_URL) bootloader_server_thread = _start_bootloader_server()
if env_singleton.env.is_debug(): if env_singleton.env.is_debug():
app.run(host="0.0.0.0", debug=True, ssl_context=(crt_path, key_path)) app.run(host="0.0.0.0", debug=True, ssl_context=(crt_path, key_path))
@ -109,10 +109,8 @@ def _start_island_server(should_setup_only, config_options: IslandConfigOptions)
bootloader_server_thread.join() bootloader_server_thread.join()
def _start_bootloader_server(mongo_url) -> Thread: def _start_bootloader_server() -> Thread:
bootloader_server_thread = Thread( bootloader_server_thread = Thread(target=BootloaderHttpServer().serve_forever, daemon=True)
target=BootloaderHttpServer(mongo_url).serve_forever, daemon=True
)
bootloader_server_thread.start() bootloader_server_thread.start()

View File

@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
class BootloaderHttpServer(ThreadingMixIn, HTTPServer): class BootloaderHttpServer(ThreadingMixIn, HTTPServer):
def __init__(self, mongo_url): def __init__(self):
server_address = ("", 5001) server_address = ("", 5001)
super().__init__(server_address, BootloaderHTTPRequestHandler) super().__init__(server_address, BootloaderHTTPRequestHandler)