From 2bdd7deb4113415053f22a42e171fefb6ae2fb1b Mon Sep 17 00:00:00 2001 From: "Ryan@SOLARIS_testStation" Date: Mon, 21 Oct 2024 16:26:18 -0400 Subject: [PATCH] the default port to avoid multiple opening for same crate at same computer is 4300 + IP --- IsegGUI.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/IsegGUI.py b/IsegGUI.py index 2fa097e..f6845a9 100755 --- a/IsegGUI.py +++ b/IsegGUI.py @@ -21,20 +21,12 @@ except: token = None # Or assign a default value if needed org = "FSUFoxLab" -ip = "https://fsunuc.physics.fsu.edu/influx/" -# databaseIP="128.186.111.107" -databaseIP=ip +databaseIP="https://fsunuc.physics.fsu.edu/influx/" write_client = influxdb_client.InfluxDBClient(url=databaseIP, token=token, org=org) bucket = "ISEG" # write_api = write_client.write_api(write_options=ASYNCHRONOUS) write_api = write_client.write_api(write_options=SYNCHRONOUS) -#assign a port, to prevent the script run mulitple time -s = socket.socket() -host = socket.gethostname() -port = 4305 -s.bind((host,port)) - nArg = len(sys.argv) if nArg > 1 : @@ -47,6 +39,14 @@ else : pushToDB = False + +#============== assign a port, to prevent the script run mulitple time +s = socket.socket() +host = socket.gethostname() +port = 4300 + int(IP[-3:]) +print("using port " + str(port)) +s.bind((host,port)) + #===================== GUI mpod = iseg.Mpod(IP)