You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/01/08 16:20:24 UTC

[GitHub] rabbah closed pull request #3156: move PureConfig strings to PureConfigKeys singleton

rabbah closed pull request #3156: move PureConfig strings to PureConfigKeys singleton
URL: https://github.com/apache/incubator-openwhisk/pull/3156
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/common/scala/src/main/scala/whisk/core/WhiskConfig.scala b/common/scala/src/main/scala/whisk/core/WhiskConfig.scala
index 471ea67adb..c2094d6dde 100644
--- a/common/scala/src/main/scala/whisk/core/WhiskConfig.scala
+++ b/common/scala/src/main/scala/whisk/core/WhiskConfig.scala
@@ -244,4 +244,7 @@ object PureConfigKeys {
   val whiskKafkaTopics = "whisk.kafka.topics"
 
   val whiskDB = "whisk.db"
+
+  val whiskDockerTimeouts = "whisk.docker.timeouts"
+  val whiskRuncTimeouts = "whisk.runc.timeouts"
 }
diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerClient.scala b/core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerClient.scala
index 4ed631d8ed..7cc1d27915 100644
--- a/core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerClient.scala
+++ b/core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerClient.scala
@@ -36,6 +36,7 @@ import pureconfig.loadConfigOrThrow
 import whisk.common.Logging
 import whisk.common.LoggingMarkers
 import whisk.common.TransactionId
+import whisk.core.PureConfigKeys
 import whisk.core.containerpool.ContainerId
 import whisk.core.containerpool.ContainerAddress
 
@@ -74,7 +75,7 @@ case class DockerClientTimeoutConfig(run: Duration,
  */
 class DockerClient(dockerHost: Option[String] = None,
                    timeouts: DockerClientTimeoutConfig =
-                     loadConfigOrThrow[DockerClientTimeoutConfig]("whisk.docker.timeouts"))(
+                     loadConfigOrThrow[DockerClientTimeoutConfig](PureConfigKeys.whiskDockerTimeouts))(
   executionContext: ExecutionContext)(implicit log: Logging, as: ActorSystem)
     extends DockerApi
     with ProcessRunner {
diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/docker/RuncClient.scala b/core/invoker/src/main/scala/whisk/core/containerpool/docker/RuncClient.scala
index 526bfc4702..b8970ecb65 100644
--- a/core/invoker/src/main/scala/whisk/core/containerpool/docker/RuncClient.scala
+++ b/core/invoker/src/main/scala/whisk/core/containerpool/docker/RuncClient.scala
@@ -27,6 +27,7 @@ import whisk.common.TransactionId
 import scala.util.Success
 import whisk.common.LoggingMarkers
 import whisk.common.Logging
+import whisk.core.PureConfigKeys
 import akka.event.Logging.ErrorLevel
 import pureconfig.loadConfigOrThrow
 import whisk.core.containerpool.ContainerId
@@ -46,7 +47,7 @@ case class RuncClientTimeouts(pause: Duration, resume: Duration)
  *
  * You only need one instance (and you shouldn't get more).
  */
-class RuncClient(timeouts: RuncClientTimeouts = loadConfigOrThrow[RuncClientTimeouts]("whisk.runc.timeouts"))(
+class RuncClient(timeouts: RuncClientTimeouts = loadConfigOrThrow[RuncClientTimeouts](PureConfigKeys.whiskRuncTimeouts))(
   executionContext: ExecutionContext)(implicit log: Logging, as: ActorSystem)
     extends RuncApi
     with ProcessRunner {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services