Skip to content

Commit

Permalink
Merge b200262 into d1da4c6
Browse files Browse the repository at this point in the history
  • Loading branch information
wphyojpl authored Dec 12, 2024
2 parents d1da4c6 + b200262 commit 09475af
Show file tree
Hide file tree
Showing 4 changed files with 476 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cumulus_lambda_functions/lib/uds_db/granules_db_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(self):
base_url=os.getenv('ES_URL'),
port=int(os.getenv('ES_PORT', '443'))
)
self.__include_percolator = os.getenv('INCLUDE_PERCOLATOR', 'TRUE') == 'TRUE'
# self.__default_fields = {
# "granule_id": {"type": "keyword"},
# "collection_id": {"type": "keyword"},
Expand Down Expand Up @@ -130,6 +131,8 @@ def create_new_index(self, tenant, tenant_venue, es_mapping: dict):
self.__es.create_alias(new_index_name, read_alias_name)
self.__es.swap_index_for_alias(write_alias_name, current_index_name, new_index_name)

if not self.__include_percolator:
return
write_perc_alias_name = f'{DBConstants.granules_write_alias_prefix}_{tenant}_{tenant_venue}_perc'.lower().strip()
read_perc_alias_name = f'{DBConstants.granules_read_alias_prefix}_{tenant}_{tenant_venue}_perc'.lower().strip()
current_perc_alias = self.__es.get_alias(write_perc_alias_name)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jsonschema==4.23.0
jsonschema-specifications==2023.12.1
lark==0.12.0
mangum==0.18.0
mdps-ds-lib==1.1.1
mdps-ds-lib==1.1.1.dev000100
pydantic==2.9.2
pydantic_core==2.23.4
pygeofilter==0.2.4
Expand Down
2 changes: 2 additions & 0 deletions tests/integration_tests/.env.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ CLIENT_ID=7a1fglm2d54eoggj13lccivp25
COGNITO_URL=https://cognito-idp.us-west-2.amazonaws.com
UNITY_URL=https://k3a3qmarxh.execute-api.us-west-2.amazonaws.com/dev
UNITY_STAGE=sbx-uds-dapa
COGNITO_USER_POOL_ID=us-west-2_aaa

Loading

0 comments on commit 09475af

Please sign in to comment.