Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptainOfHacks committed Sep 25, 2023
1 parent e0f85c7 commit b6b10b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dags/operators/DagBatchPipelineOperator.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def single_notice_processor(self, notice_id: str, notice_repository: NoticeRepos
print("ERROR MESSAGE: ", error_message)
except Exception as exception_error_message:
error_message = str(exception_error_message)
if error_message:
if error_message is not None:
notice_normalised_metadata = notice.normalised_metadata if notice else None
log_notice_error(message=error_message, notice_id=notice_id, domain_action=pipeline_name,
notice_form_number=notice_normalised_metadata.form_number if notice_normalised_metadata else None,
Expand Down
3 changes: 3 additions & 0 deletions dags/pipelines/notice_processor_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ def notice_normalisation_pipeline(notice: Notice, mongodb_client: MongoClient =
indexed_notice = index_notice(notice=notice)
try:
normalised_notice = normalise_notice(notice=indexed_notice)
normalised_notice.update_status_to(new_status=NoticeStatus.NORMALISED_METADATA)
print("Notice normalisation pipeline succes: ", normalised_notice.ted_id)
return NoticePipelineOutput(notice=normalised_notice)
except Exception as error_message:
print("Notice normalisation pipeline error: ", normalised_notice.ted_id)
return NoticePipelineOutput(notice=indexed_notice, processed=False,
store_result=True, error_message=str(error_message))

Expand Down

0 comments on commit b6b10b6

Please sign in to comment.