update @docker
This commit is contained in:
parent
0ac86c9a78
commit
a0ce36a342
@ -14,8 +14,9 @@ def find_available_port(start_port=80):
|
|||||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
color_log.Show(3,f"Check port {start_port} for db server { os.getenv('DB_SERVER','localhost') }")
|
server = os.getenv('DB_SERVER','localhost')
|
||||||
sock.bind((os.getenv('DB_SERVER','localhost'), start_port))
|
color_log.Show(3,f"Check port {start_port} for db server {server}")
|
||||||
|
sock.bind(server, start_port)
|
||||||
color_log.Show(3,f" {start_port} is Open")
|
color_log.Show(3,f" {start_port} is Open")
|
||||||
return start_port
|
return start_port
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
|
@ -19,7 +19,9 @@ def find_available_port(start_port=80):
|
|||||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
sock.bind(('localhost', start_port))
|
server = os.getenv('DB_SERVER','localhost')
|
||||||
|
color_log.Show(3,f"Check port {start_port} for db server {server}")
|
||||||
|
sock.bind(server, start_port)
|
||||||
color_log.Show(3,f" {start_port} is Open")
|
color_log.Show(3,f" {start_port} is Open")
|
||||||
return start_port
|
return start_port
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user