From 09fdbb8b5dafef735fd6fbb39fa233d498f3ed9d Mon Sep 17 00:00:00 2001 From: cheezedoodle2 Date: Thu, 18 May 2023 14:56:46 -0700 Subject: [PATCH] Move future.resuit() into the try block --- fp2_10.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fp2_10.py b/fp2_10.py index 67fb35f..3a19e83 100644 --- a/fp2_10.py +++ b/fp2_10.py @@ -52,9 +52,9 @@ with open(file_path, "r") as csv_file: data = ",".join(row).encode("utf-8") try: future = publisher.publish(topic_path, data) + print(f"Published message ID {future.result()}") except DeadlineExceeded as de: print(f"Caught DeadlineExceeded exception: {de}") - print(f"Published message ID {future.result()}") ''' async def receive_messages():