Skip to content

Commit

Permalink
Scala format
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfurey committed Jan 31, 2024
1 parent 98dd23f commit f9eef32
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions facia-press/app/frontpress/FrontPressCron.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ class FrontPressCron(liveFapiFrontPress: LiveFapiFrontPress, toolPressQueueWorke
}
}

override lazy val queue: JsonMessageQueue[SNSNotification] = (Configuration.faciatool.frontPressCronQueue map { queueUrl =>
val credentials = Configuration.aws.mandatoryCredentials

JsonMessageQueue[SNSNotification](
AmazonSQSAsyncClient.asyncBuilder.withCredentials(credentials).withRegion(conf.Configuration.aws.region).build(),
queueUrl,
)
override lazy val queue: JsonMessageQueue[SNSNotification] = (Configuration.faciatool.frontPressCronQueue map {
queueUrl =>
val credentials = Configuration.aws.mandatoryCredentials

JsonMessageQueue[SNSNotification](
AmazonSQSAsyncClient.asyncBuilder
.withCredentials(credentials)
.withRegion(conf.Configuration.aws.region)
.build(),
queueUrl,
)
}) getOrElse {
throw new RuntimeException("Required property 'frontpress.sqs.cron_queue_url' not set")
}
Expand Down

0 comments on commit f9eef32

Please sign in to comment.