@@ -10,7 +10,7 @@ def notice_normalisation_pipeline(notice: Notice, mongodb_client: MongoClient) -
1010 """
1111 from ted_sws .data_sampler .services .notice_xml_indexer import index_notice
1212 from ted_sws .notice_metadata_processor .services .metadata_normalizer import normalise_notice
13-
13+ notice . update_status_to ( new_status = NoticeStatus . RAW )
1414 indexed_notice = index_notice (notice = notice )
1515 normalised_notice = normalise_notice (notice = indexed_notice )
1616
@@ -27,7 +27,7 @@ def notice_transformation_pipeline(notice: Notice, mongodb_client: MongoClient)
2727 from ted_sws .notice_transformer .services .notice_transformer import transform_notice
2828 from ted_sws .notice_transformer .adapters .rml_mapper import RMLMapper
2929 from ted_sws .data_manager .adapters .mapping_suite_repository import MappingSuiteRepositoryMongoDB
30-
30+ notice . update_status_to ( new_status = NoticeStatus . NORMALISED_METADATA )
3131 mapping_suite_repository = MappingSuiteRepositoryMongoDB (mongodb_client = mongodb_client )
3232 result = notice_eligibility_checker (notice = notice , mapping_suite_repository = mapping_suite_repository )
3333 if not result :
@@ -57,7 +57,7 @@ def notice_validation_pipeline(notice: Notice, mongodb_client: MongoClient) -> N
5757 from ted_sws .notice_validator .services .xpath_coverage_runner import validate_xpath_coverage_notice
5858 from ted_sws .data_manager .adapters .mapping_suite_repository import MappingSuiteRepositoryMongoDB
5959 from ted_sws .event_manager .services .log import log_notice_info
60-
60+ notice . update_status_to ( new_status = NoticeStatus . DISTILLED )
6161 mapping_suite_id = notice .distilled_rdf_manifestation .mapping_suite_id
6262 mapping_suite_repository = MappingSuiteRepositoryMongoDB (mongodb_client = mongodb_client )
6363 mapping_suite = mapping_suite_repository .get (reference = mapping_suite_id )
@@ -82,6 +82,7 @@ def notice_package_pipeline(notice: Notice, mongodb_client: MongoClient) -> Noti
8282 """
8383 from ted_sws .notice_packager .services .notice_packager import package_notice
8484
85+ notice .update_status_to (new_status = NoticeStatus .VALIDATED )
8586 # TODO: Implement notice package eligiblity
8687 notice .set_is_eligible_for_packaging (eligibility = True )
8788 packaged_notice = package_notice (notice = notice )
@@ -95,7 +96,7 @@ def notice_publish_pipeline(notice: Notice, mongodb_client: MongoClient) -> Noti
9596 from ted_sws .notice_publisher .services .notice_publisher import publish_notice , publish_notice_rdf_into_s3
9697 from ted_sws .event_manager .services .log import log_notice_error
9798 from ted_sws import config
98-
99+ notice . update_status_to ( new_status = NoticeStatus . PACKAGED )
99100 if config .S3_PUBLISH_ENABLED :
100101 published_into_s3 = publish_notice_rdf_into_s3 (notice = notice )
101102 if not published_into_s3 :
@@ -106,4 +107,5 @@ def notice_publish_pipeline(notice: Notice, mongodb_client: MongoClient) -> Noti
106107 if result :
107108 return NoticePipelineOutput (notice = notice )
108109 else :
110+ notice .set_is_eligible_for_publishing (eligibility = False )
109111 return NoticePipelineOutput (notice = notice , processed = False )
0 commit comments