Merge branch 'feature/QUANT-2992' into feature/QUANT-2993
This commit is contained in:
commit
49918eb28e
@ -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]:
|
def get_object_tag(key: str, bucket: str, tag_key: str) -> Union[str, None]:
|
||||||
tags = get_object_tags(key, bucket)
|
tags = get_object_tags(key, bucket)
|
||||||
tag_index = 0
|
|
||||||
|
|
||||||
while tag_index < len(tags):
|
for i, tag in enumerate(tags):
|
||||||
tag = tags[tag_index]
|
tag = tags[i]
|
||||||
if tag['Key'] == tag_key:
|
if tag['Key'] == tag_key:
|
||||||
return tag
|
return tag
|
||||||
else:
|
else:
|
||||||
|
@ -28,7 +28,6 @@ class ServiceListener(Consumer):
|
|||||||
# but depending on if we can add the tagset to the sqs message body
|
# 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
|
# we either extract that and then delegate to the appropriate service
|
||||||
# or get the action tag from the object through the aws helper function
|
# or get the action tag from the object through the aws helper function
|
||||||
# service = None
|
|
||||||
key = aws_helper.get_key_from_message(body)
|
key = aws_helper.get_key_from_message(body)
|
||||||
bucket = aws_helper.get_bucket_from_message(body)
|
bucket = aws_helper.get_bucket_from_message(body)
|
||||||
action = aws_helper.get_object_tag(key, bucket, 'action')['Value']
|
action = aws_helper.get_object_tag(key, bucket, 'action')['Value']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user