Skip to content

Commit

Permalink
raising InternalError process_query_product
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 committed Sep 1, 2023
1 parent f20be6b commit ff4e5a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cdci_data_analysis/analysis/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def test_has_products(self,instrument,query_type='Real',logger=None,config=None,
input_prod_list=[]
query_out.set_products(['input_prod_list', 'len_prod_list'], [input_prod_list, len(input_prod_list)])

raise
raise InternalError(e_message)

logger.info('--> test has products status %d' % query_out.get_status())
logger.info('--> end test has products test')
Expand Down Expand Up @@ -654,14 +654,17 @@ def process_query_product(self,
process_products_query_out.set_done( message=message, debug_message=str(debug_message), job_status=job.status,status=status,comment=backend_comment,warning=backend_warning)

except Exception as e:
e_message = f"Error when processing query products (instrument: {instrument.name}, product: {self.name}):\n{repr(e)}"

Check warning on line 657 in cdci_data_analysis/analysis/queries.py

View check run for this annotation

Codecov / codecov/patch

cdci_data_analysis/analysis/queries.py#L657

Added line #L657 was not covered by tests
#status=1
job.set_failed()
# FAILED
sentry.capture_exception(e)

Check warning on line 661 in cdci_data_analysis/analysis/queries.py

View check run for this annotation

Codecov / codecov/patch

cdci_data_analysis/analysis/queries.py#L661

Added line #L661 was not covered by tests
process_products_query_out.set_failed('product processing',
extra_message='product processing failed',
e_message=e_message,
logger=logger,
excep=e)
raise InternalError(e_message)

Check warning on line 667 in cdci_data_analysis/analysis/queries.py

View check run for this annotation

Codecov / codecov/patch

cdci_data_analysis/analysis/queries.py#L667

Added line #L667 was not covered by tests

logger.info('==>prod_process_status %d' % process_products_query_out.get_status())
logger.info('--> end product process')
Expand Down

0 comments on commit ff4e5a7

Please sign in to comment.