mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-18029 Fix Python console for Docker and Docker Compose
* Use `server` mode for Python console. * Support `port` parameter for `server` mode. * Wait for `server` to be started and then try to connect.
This commit is contained in:
@@ -349,7 +349,10 @@ def enable_thrift_logging():
|
||||
logger.addHandler(ch)
|
||||
|
||||
|
||||
def start_server():
|
||||
def start_server(port):
|
||||
if port is None:
|
||||
port = 0
|
||||
|
||||
# 0. General stuff
|
||||
|
||||
#replace exit (see comments on method)
|
||||
@@ -371,7 +374,7 @@ def start_server():
|
||||
# `InterpreterInterface` implements all methods required for the handler
|
||||
server_handler = interpreter
|
||||
|
||||
server_socket = start_rpc_server_and_make_client('', 0, server_service, client_service, server_handler)
|
||||
server_socket = start_rpc_server_and_make_client('', port, server_service, client_service, server_handler)
|
||||
|
||||
|
||||
# 2. Print server port for the IDE
|
||||
@@ -606,4 +609,4 @@ if __name__ == '__main__':
|
||||
|
||||
pydevconsole.start_client(host, port)
|
||||
elif mode == 'server':
|
||||
pydevconsole.start_server()
|
||||
pydevconsole.start_server(port)
|
||||
|
||||
Reference in New Issue
Block a user