Skip to content

Commit

Permalink
handle 'ebikes-for-essentials' typo for PROD_LIST
Browse files Browse the repository at this point in the history
The config name is e-bikes-for-essentials while the db name is ebikes_for_essentials, which is inconsistent with all the other deployments. I don't think we can easily change it, so we handle it here as a special case

Co-authored-by: K. Shankari <[email protected]>
  • Loading branch information
JGreenlee and shankari committed Jan 24, 2025
1 parent 47ab8be commit 9fdaad9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/historical/migrations/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ def run_on_all_deployments(fn_to_run):
nrel-openpath-deploy-configs repo upon initialization of this module.
"""
for prod in PROD_LIST:
# e-bikes-for-essentials has a typo; treat as special case
if prod == 'e-bikes-for-essentials':
prod = 'ebikes-for-essentials'

prod_db_name = prod.replace("-", "_")
print(f"Running {fn_to_run.__name__} for {prod} on DB {prod_db_name}")
os.environ['DB_HOST'] = DB_HOST_TEMPLATE.replace(
Expand Down

0 comments on commit 9fdaad9

Please sign in to comment.