Skip to content

Commit fe7ca1b

Browse files
committed
fix: update completed status logic
1 parent 1f28c26 commit fe7ca1b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cumulus_lambda_functions/granules_to_es/granules_indexer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,12 @@ def start(self):
7878
return
7979
self.__cumulus_record = incoming_msg['record']
8080
if len(self.__cumulus_record['files']) < 1:
81+
LOGGER.debug(f'No files in cumulus record. Not inserting to ES')
8182
# TODO ingest updating stage?
8283
return
84+
if 'status' not in self.__cumulus_record or self.__cumulus_record['status'].upper() != 'COMPLETED':
85+
LOGGER.debug(f'missing status or it is NOT COMPLETED status. Not inserting to ES')
86+
return
8387
stac_input_meta = None
8488
potential_files = self.__get_potential_files()
8589
LOGGER.debug(f'potential_files: {potential_files}')

0 commit comments

Comments
 (0)