You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by se...@apache.org on 2020/10/10 18:26:36 UTC
[incubator-nlpcraft] branch NLPCRAFT-149 created (now b821340)
This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a change to branch NLPCRAFT-149
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git.
at b821340 WIP.
This branch includes the following new commits:
new b821340 WIP.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[incubator-nlpcraft] 01/01: WIP.
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-149
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit b8213400fa775f6e1510a48e554f65780eabcc52
Author: Sergey Kamov <se...@apache.org>
AuthorDate: Sat Oct 10 21:26:29 2020 +0300
WIP.
---
.../src/main/scala/org/apache/nlpcraft/common/NCService.scala | 4 ++--
.../main/scala/org/apache/nlpcraft/probe/NCProbeBoot.scala | 11 ++++++-----
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCService.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCService.scala
index 7a592ce..b4a89b8 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCService.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCService.scala
@@ -78,7 +78,7 @@ abstract class NCService extends LazyLogging with NCOpenCensusTrace {
starting = true
timeStampMs = currentTime
- logger.trace("$name staring...")
+ logger.trace(s"$name staring...")
addTags(currentSpan(),
"state" → "starting"
@@ -96,7 +96,7 @@ abstract class NCService extends LazyLogging with NCOpenCensusTrace {
stopping = true
timeStampMs = currentTime
- logger.trace("$name stopping...")
+ logger.trace(s"$name stopping...")
addTags(currentSpan(),
"state" → "stopping"
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/NCProbeBoot.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/NCProbeBoot.scala
index 535a8f7..0d3f5fe 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/NCProbeBoot.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/NCProbeBoot.scala
@@ -216,9 +216,6 @@ private [probe] object NCProbeBoot extends LazyLogging with NCOpenCensusTrace {
*/
private def stop0(): Unit = {
ignoring(classOf[Throwable]) {
- if (shutdownHook != null)
- Runtime.getRuntime.removeShutdownHook(shutdownHook)
-
stopManagers()
}
@@ -327,10 +324,14 @@ private [probe] object NCProbeBoot extends LazyLogging with NCOpenCensusTrace {
/**
*
*/
- private [probe] def stop(): Unit =
+ private [probe] def stop(): Unit = {
+ if (shutdownHook != null)
+ Runtime.getRuntime.removeShutdownHook(shutdownHook)
+
if (started)
stop0()
-
+ }
+
/**
*
* @param args