From 0b0cdc80bac879afdc720ebd8953b03ba77b6bbc Mon Sep 17 00:00:00 2001 From: Marc Vilanova <39573146+mvilanova@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:01:34 -0800 Subject: [PATCH] bugfix(aws-plugin-signal-consume): always json.loads() message body message (#5593) --- src/dispatch/plugins/dispatch_aws/plugin.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dispatch/plugins/dispatch_aws/plugin.py b/src/dispatch/plugins/dispatch_aws/plugin.py index 80bb63c78814..96e858cf6ea3 100644 --- a/src/dispatch/plugins/dispatch_aws/plugin.py +++ b/src/dispatch/plugins/dispatch_aws/plugin.py @@ -82,9 +82,8 @@ def consume(self, db_session: Session, project: Project) -> None: if message_attributes.get("compressed", {}).get("Value") == "zlib": # Message is compressed, decompress it message_body_message = decompress_json(message_body_message) - signal_data = json.loads(message_body_message) - else: - signal_data = message_body_message + + signal_data = json.loads(message_body_message) except Exception as e: log.exception(f"Unable to extract signal data from SQS message: {e}") continue