Auto-update: Mon Sep 23 09:54:46 PDT 2024
This commit is contained in:
parent
3fc0f9d30c
commit
7abaa9d75c
1 changed files with 10 additions and 8 deletions
|
@ -8,8 +8,9 @@ from tqdm import tqdm
|
|||
|
||||
def load_config():
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
sys_config_path = os.path.join(script_dir, '..', 'config', 'sys.yaml')
|
||||
gis_config_path = os.path.join(script_dir, '..', 'config', 'gis.yaml')
|
||||
project_root = os.path.abspath(os.path.join(script_dir, '..', '..'))
|
||||
sys_config_path = os.path.join(project_root, 'config', 'sys.yaml')
|
||||
gis_config_path = os.path.join(project_root, 'config', 'gis.yaml')
|
||||
|
||||
with open(sys_config_path, 'r') as f:
|
||||
sys_config = yaml.safe_load(f)
|
||||
|
@ -19,6 +20,7 @@ def load_config():
|
|||
|
||||
return sys_config, gis_config
|
||||
|
||||
|
||||
def get_table_size(server, table_name):
|
||||
env = os.environ.copy()
|
||||
env['PGPASSWORD'] = server['db_pass']
|
||||
|
|
Loading…
Reference in a new issue