This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-27
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-27 by this push:
new afc26f6 WIP.
afc26f6 is described below
commit afc26f6423720da1b1fc66c08e151c17bb5e3585
Author: Sergey Kamov <[email protected]>
AuthorDate: Wed Mar 25 16:45:37 2020 +0300
WIP.
---
.../org/apache/nlpcraft/common/config/NCConfigurable.scala | 4 ++--
.../apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala | 11 ++++++-----
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git
a/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurable.scala
b/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurable.scala
index b0cb272..457bb0b 100644
--- a/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurable.scala
+++ b/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurable.scala
@@ -29,8 +29,8 @@ import scala.collection.JavaConverters._
trait NCConfigurable extends LazyLogging {
import NCConfigurable._
- // Accessor to the loaded config.
- private val hocon: Config = cfg
+ // Accessor to the loaded config. It should reload config.
+ private def hocon: Config = cfg
/**
*
diff --git
a/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
b/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
index 050879a..e496a92 100644
--- a/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
+++ b/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
@@ -46,11 +46,12 @@ object NCDeployManager extends NCService with
DecorateAsScala {
private object Config extends NCConfigurable {
private final val pre = "nlpcraft.probe"
-
- val modelFactoryType: Option[String] =
getStringOpt(s"$pre.modelFactory.type")
- val modelFactoryProps: Option[Map[String, String]] =
getMapOpt(s"$pre.modelFactory.properties")
- val models: Seq[String] = getStringList(s"$pre.models")
- val jarsFolder: Option[String] = getStringOpt(s"$pre.jarsFolder")
+
+ // It should reload config.
+ def modelFactoryType: Option[String] =
getStringOpt(s"$pre.modelFactory.type")
+ def modelFactoryProps: Option[Map[String, String]] =
getMapOpt(s"$pre.modelFactory.properties")
+ def models: Seq[String] = getStringList(s"$pre.models")
+ def jarsFolder: Option[String] = getStringOpt(s"$pre.jarsFolder")
}
/**