Loading csst_dag/dfs.py→csst_dag/dfs/__init__.py +3 −4 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ from csst_dfs_client import plan, level0 from astropy.table import Table import socket CONFIG = toml.load(os.path.join(os.path.dirname(__file__), "config", "config.toml")) CONFIG = toml.load(os.path.join(os.path.dirname(__file__), "config.toml")) def check_port(ip, port, timeout=3): Loading Loading @@ -34,10 +34,9 @@ def check_port(ip, port, timeout=3): class DFS: def __init__(self, location=None): # try each location print("Test all locations:", end="") print("Test all locations...", end="") status_list = [] for loc in CONFIG.keys(): print(f"{loc}...", end="") dfs_ip = CONFIG[loc]["dfs"]["CSST_DFS_GATEWAY"].split(":")[0] dfs_port = int(CONFIG[loc]["dfs"]["CSST_DFS_GATEWAY"].split(":")[1]) redis_ip = CONFIG[loc]["redis"]["host"] Loading @@ -55,7 +54,7 @@ class DFS: print("Done!\n") status_table = Table(status_list) print(status_table) print("\n") if status_table["status"].sum() == 0: raise ValueError("No DFS location is available") elif status_table["status"].sum() > 1: Loading csst_dag/config/config.toml→csst_dag/dfs/config.toml +0 −0 File moved. View file Loading
csst_dag/dfs.py→csst_dag/dfs/__init__.py +3 −4 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ from csst_dfs_client import plan, level0 from astropy.table import Table import socket CONFIG = toml.load(os.path.join(os.path.dirname(__file__), "config", "config.toml")) CONFIG = toml.load(os.path.join(os.path.dirname(__file__), "config.toml")) def check_port(ip, port, timeout=3): Loading Loading @@ -34,10 +34,9 @@ def check_port(ip, port, timeout=3): class DFS: def __init__(self, location=None): # try each location print("Test all locations:", end="") print("Test all locations...", end="") status_list = [] for loc in CONFIG.keys(): print(f"{loc}...", end="") dfs_ip = CONFIG[loc]["dfs"]["CSST_DFS_GATEWAY"].split(":")[0] dfs_port = int(CONFIG[loc]["dfs"]["CSST_DFS_GATEWAY"].split(":")[1]) redis_ip = CONFIG[loc]["redis"]["host"] Loading @@ -55,7 +54,7 @@ class DFS: print("Done!\n") status_table = Table(status_list) print(status_table) print("\n") if status_table["status"].sum() == 0: raise ValueError("No DFS location is available") elif status_table["status"].sum() > 1: Loading