Fix 'receive_message_wait_time_seconds' SQS broker management (#243)

* Fix 'receive_message_wait_time_seconds' SQS broker management

* Remove socket volume from localstack container
This commit is contained in:
Alberto
2024-11-03 15:04:35 +01:00
committed by GitHub
parent 35c911080b
commit fb23b6b825
5 changed files with 64 additions and 11 deletions
+9 -7
View File
@@ -1,3 +1,5 @@
import copy
from boto3 import Session
from botocore.client import ClientError
@@ -78,15 +80,15 @@ class Sqs(Broker):
@staticmethod
def get_connection(list_key: str = None) -> Session:
config = Conf.SQS
if "aws_region" in config:
config["region_name"] = config["aws_region"]
del config["aws_region"]
config_cloned = copy.deepcopy(Conf.SQS)
if "aws_region" in config_cloned:
config_cloned["region_name"] = config_cloned["aws_region"]
del config_cloned["aws_region"]
if "receive_message_wait_time_seconds" in config:
del config["receive_message_wait_time_seconds"]
if "receive_message_wait_time_seconds" in config_cloned:
del config_cloned["receive_message_wait_time_seconds"]
return Session(**config)
return Session(**config_cloned)
def get_queue(self):
self.sqs = self.connection.resource("sqs")