From d183ef768d90e98a1ecbf2120558b42121188001 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 13 Sep 2016 11:33:25 -0400 Subject: [PATCH] Defer console startup until after API startup Consoles starting up would potentially delay API availaility. Change by having the API having ample time to startup, then commence the busy work of starting cnosole sessions. --- confluent_server/confluent/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/main.py b/confluent_server/confluent/main.py index 6160f9e7..b8536eec 100644 --- a/confluent_server/confluent/main.py +++ b/confluent_server/confluent/main.py @@ -209,7 +209,6 @@ def run(): os.umask(oumask) http_bind_host, http_bind_port = _get_connector_config('http') sock_bind_host, sock_bind_port = _get_connector_config('socket') - consoleserver.start_console_sessions() webservice = httpapi.HttpApi(http_bind_host, http_bind_port) webservice.start() try: @@ -218,6 +217,8 @@ def run(): except NameError: pass atexit.register(doexit) + eventlet.sleep(1) + consoleserver.start_console_sessions() while 1: eventlet.sleep(100)