This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch NLPCRAFT-111
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-111 by this push:
     new c030316  WIP.
c030316 is described below

commit c030316e974a593cbaebe5cb8c477667809a2dfc
Author: Aaron Radzinski <[email protected]>
AuthorDate: Tue Jan 26 11:55:22 2021 -0800

    WIP.
---
 .../org/apache/nlpcraft/common/pool/NCThreadPoolManager.scala      | 2 +-
 .../src/main/scala/org/apache/nlpcraft/probe/NCProbeBoot.scala     | 7 ++-----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/pool/NCThreadPoolManager.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/pool/NCThreadPoolManager.scala
index 5a931d3..58f419d 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/pool/NCThreadPoolManager.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/pool/NCThreadPoolManager.scala
@@ -81,7 +81,7 @@ object NCThreadPoolManager extends NCService {
                     Holder(ExecutionContext.fromExecutor(exec), Some(exec))
                 }
                 else
-                    Holder(getSystemContext, None)
+                    throw new NCE(s"Custom execution context for unexpected 
thread pool: $name")
         ).context
 
     override def start(parent: Span): NCService = startScopedSpan("start", 
parent) { _ ⇒
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 db46920..19308e3 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/NCProbeBoot.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/NCProbeBoot.scala
@@ -289,12 +289,9 @@ private [probe] object NCProbeBoot extends LazyLogging 
with NCOpenCensusTrace {
                 case Right(rawObj) ⇒
                     val beacon = rawObj.asInstanceOf[NCCliProbeBeacon]
 
-                    if (ProcessHandle.of(beacon.pid).isPresent) {
+                    if (ProcessHandle.of(beacon.pid).isPresent)
                         logger.warn(s"Another local probe detected (safely 
ignored) [id=${beacon.id}, pid=${beacon.pid}]")
-                        logger.warn(s"NOTE: ${c("only one")} locally deployed 
probe can be managed by 'nlpcraft.{sh|cmd}' management script.")
-
-                        // Leave the existing probe beacon as is...
-                    } else {
+                    else { // Leave the existing probe beacon as is...
                         logger.trace(s"Overriding probe beacon for a phantom 
process [pid=${beacon.pid}]")
 
                         save()

Reply via email to