Skip to content

Commit 66ebe4f

Browse files
authored
fix: sqs setup (#836)
1 parent d8a8f7f commit 66ebe4f

File tree

1 file changed

+7
-8
lines changed
  • orchestrator/src/setup/aws

1 file changed

+7
-8
lines changed

orchestrator/src/setup/aws/sqs.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ impl Resource for InnerSQS {
6464

6565
tracing::info!("Queue created for type {}", queue_type);
6666

67-
let mut attributes = HashMap::new();
68-
6967
if let Some(dlq_config) = &queue.dlq_config {
7068
let dlq_url = if self
7169
.check_if_exists(&(args.queue_template_identifier.clone(), dlq_config.dlq_name.clone()))
@@ -113,14 +111,15 @@ impl Resource for InnerSQS {
113111
&queue_name,
114112
&dlq_config.dlq_name
115113
);
114+
let mut attributes = HashMap::new();
116115
attributes.insert(QueueAttributeName::RedrivePolicy, policy);
116+
self.client()
117+
.set_queue_attributes()
118+
.queue_url(queue_url)
119+
.set_attributes(Some(attributes))
120+
.send()
121+
.await?;
117122
}
118-
self.client()
119-
.set_queue_attributes()
120-
.queue_url(queue_url)
121-
.set_attributes(Some(attributes))
122-
.send()
123-
.await?;
124123
tracing::info!("Setup completed for queue: {}", queue_type);
125124
}
126125
}

0 commit comments

Comments
 (0)