Merge branch 'feature/QUANT-2992' into feature/QUANT-2993

This commit is contained in:
brmnjsh 2023-09-08 15:52:59 +00:00
commit 49918eb28e
2 changed files with 2 additions and 4 deletions

View File

@ -31,10 +31,9 @@ def get_object(key: str, bucket: str) -> bytes:
def get_object_tag(key: str, bucket: str, tag_key: str) -> Union[str, None]:
tags = get_object_tags(key, bucket)
tag_index = 0
while tag_index < len(tags):
tag = tags[tag_index]
for i, tag in enumerate(tags):
tag = tags[i]
if tag['Key'] == tag_key:
return tag
else:

View File

@ -28,7 +28,6 @@ class ServiceListener(Consumer):
# but depending on if we can add the tagset to the sqs message body
# we either extract that and then delegate to the appropriate service
# or get the action tag from the object through the aws helper function
# service = None
key = aws_helper.get_key_from_message(body)
bucket = aws_helper.get_bucket_from_message(body)
action = aws_helper.get_object_tag(key, bucket, 'action')['Value']