Fix : SQS Create Queue with attributes (#3345)
* Considering only new attributes while queue creation * Linting Co-authored-by: usmankb <usman@krazybee.com> Co-authored-by: Bert Blommers <info@bertblommers.nl>
This commit is contained in:
parent
1dd5cf08a8
commit
1c3ba83fc2
2 changed files with 15 additions and 15 deletions
|
|
@ -545,22 +545,10 @@ class SQSBackend(BaseBackend):
|
|||
|
||||
queue_attributes = queue.attributes
|
||||
new_queue_attributes = new_queue.attributes
|
||||
static_attributes = (
|
||||
"DelaySeconds",
|
||||
"MaximumMessageSize",
|
||||
"MessageRetentionPeriod",
|
||||
"Policy",
|
||||
"QueueArn",
|
||||
"ReceiveMessageWaitTimeSeconds",
|
||||
"RedrivePolicy",
|
||||
"VisibilityTimeout",
|
||||
"KmsMasterKeyId",
|
||||
"KmsDataKeyReusePeriodSeconds",
|
||||
"FifoQueue",
|
||||
"ContentBasedDeduplication",
|
||||
)
|
||||
|
||||
for key in static_attributes:
|
||||
# only the attributes which are being sent for the queue
|
||||
# creation have to be compared if the queue is existing.
|
||||
for key in kwargs:
|
||||
if queue_attributes.get(key) != new_queue_attributes.get(key):
|
||||
raise QueueAlreadyExists("The specified queue already exists.")
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue