Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit 2997479

Browse files
committed
address formatting issues
1 parent efae23a commit 2997479

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/main/scala/com/weightwatchers/reactive/kinesis/producer/ProducerConf.scala

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ object ProducerConf {
5959
.withFallback(kinesisConfig.getConfig("default-producer"))
6060

6161
val streamName = producerConfig.getString("stream-name")
62-
require(!streamName.isEmpty, s"Config field `stream-name` missing, a value must be provided to start the Kinesis Producer!")
62+
require(
63+
!streamName.isEmpty,
64+
s"Config field `stream-name` missing, a value must be provided to start the Kinesis Producer!"
65+
)
6366

6467
val dispatcher: Option[String] =
6568
if (producerConfig.getIsNull("akka.dispatcher"))
@@ -77,9 +80,9 @@ object ProducerConf {
7780
buildKPLConfig(kplConfig, credentialsProvider)
7881

7982
new ProducerConf(streamName,
80-
kplLibConfiguration,
81-
dispatcher,
82-
parseThrottlingConfig(producerConfig))
83+
kplLibConfiguration,
84+
dispatcher,
85+
parseThrottlingConfig(producerConfig))
8386
}
8487

8588
private def buildKPLConfig(kplConfig: Config,
@@ -109,18 +112,18 @@ object ProducerConf {
109112

110113
private def parseThrottlingConfig(producerConfig: Config): Option[ThrottlingConf] = {
111114
if (!producerConfig.hasPath("akka.max-outstanding-requests")
112-
|| producerConfig.getIsNull("akka.max-outstanding-requests"))
115+
|| producerConfig.getIsNull("akka.max-outstanding-requests"))
113116
None
114117
else {
115118
val maxOutstandingRequests = producerConfig.getInt("akka.max-outstanding-requests")
116119

117120
if (!producerConfig.hasPath("akka.throttling-retry-millis")
118-
|| producerConfig.getIsNull("akka.throttling-retry-millis"))
121+
|| producerConfig.getIsNull("akka.throttling-retry-millis"))
119122
Some(ThrottlingConf(maxOutstandingRequests))
120123
else
121124
Some(
122125
ThrottlingConf(maxOutstandingRequests,
123-
producerConfig.getLong("akka.throttling-retry-millis").millis)
126+
producerConfig.getLong("akka.throttling-retry-millis").millis)
124127
)
125128
}
126129
}

0 commit comments

Comments
 (0)