From 6c6f6657e394447bd97ee7c245e40da7aba930f9 Mon Sep 17 00:00:00 2001 From: korikuzma Date: Tue, 2 Apr 2024 08:52:16 -0400 Subject: [PATCH] move ddb env var --- src/metakb/cli.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/metakb/cli.py b/src/metakb/cli.py index 0ee3f01f..b901f523 100644 --- a/src/metakb/cli.py +++ b/src/metakb/cli.py @@ -154,16 +154,16 @@ async def update_metakb_db( "Error: Can only use one of `--load_latest_cdms`, `--load_target_cdm`, `--load_latest_s3_cdms`." ) - if normalizers_db_url: - for env_var_name in [ - "GENE_NORM_DB_URL", - "THERAPY_NORM_DB_URL", - "DISEASE_NORM_DB_URL", - ]: - environ[env_var_name] = normalizers_db_url - if not any([load_latest_cdms, load_target_cdm, load_latest_s3_cdms]): if force_load_normalizers_db: + if normalizers_db_url: + for env_var_name in [ + "GENE_NORM_DB_URL", + "THERAPY_NORM_DB_URL", + "DISEASE_NORM_DB_URL", + ]: + environ[env_var_name] = normalizers_db_url + _load_normalizers_db() _harvest_sources(update_cached)