diff --git a/helper.py b/helper.py index 76139f9db61898b97742f17016ceead36dfa89f9..048400e7394b339d922d6be5e176bab7ec737127 100644 --- a/helper.py +++ b/helper.py @@ -99,13 +99,13 @@ def publish_document(template_id, data_csv, document_id): blob = bucket.blob(f"results/{document_id}/data.csv") blob.upload_from_file(data_csv) - # publisher = pubsub_v1.PublisherClient.from_service_account_json( - # "service_account.json" - # ) - # topic_path = publisher.topic_path("law-project-422612", "manipulation-topic") + publisher = pubsub_v1.PublisherClient.from_service_account_json( + "service_account.json" + ) + topic_path = publisher.topic_path("law-project-422612", "manipulation-topic") - # bytes_data = f"{template_id},{document_id}".encode() - # publisher.publish(topic_path, bytes_data) + bytes_data = f"{template_id},{document_id}".encode() + publisher.publish(topic_path, bytes_data) return document_id