Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#711 Some minor tweaks to #724 work #726

Merged
merged 2 commits into from
Jun 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions squbs-unicomplex/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ squbs {
# besides this file name list
external-config-files = []

# Timeouts for the service-infra startup applies to both the wait time for a response from each listener and the
# overall time it takes for all listeners to start.
# Service infra configuration.
service-infra {
# Maximum amount of time to wait for all listeners to be started.
timeout = 60s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,10 @@ object UnicomplexBoot extends LazyLogging {
def getTimeout(keyRelPath: String): Option[Timeout] = {
val key = s"squbs.service-infra.$keyRelPath"
val timeoutDuration = actorSystem.settings.config.getOptionalDuration(key)
timeoutDuration.foreach { to =>
require(to.toMillis > 0, s"The config property, $key, must be greater than 0 milliseconds.")
timeoutDuration.map { d =>
require(d.toMillis > 0, s"The config property, $key, must be greater than 0 milliseconds.")
Timeout(d)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Definitely makes the code more compact.

}
timeoutDuration.map { d => Timeout(d) }
}

val overallTimeout = getTimeout("timeout").getOrElse(Timeout(60.seconds))
Expand Down