From c1e96e8a5c4246d174a1a60576d644f222009f63 Mon Sep 17 00:00:00 2001 From: recedivies <ahmadhiprananta@gmail.com> Date: Tue, 4 Jun 2024 12:09:08 +0700 Subject: [PATCH] Finishing Project --- helper.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/helper.py b/helper.py index 76139f9..048400e 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 -- GitLab