This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-41
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-41 by this push:
new f252759 WIP.
f252759 is described below
commit f2527594053d0b7af427c2753cf1dd9c853a14fc
Author: Sergey Kamov <[email protected]>
AuthorDate: Wed Sep 16 17:20:06 2020 +0300
WIP.
---
.../nlpcraft/probe/mgrs/cmd/NCCommandManager.scala | 24 +---------------------
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/cmd/NCCommandManager.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/cmd/NCCommandManager.scala
index e2cc9d1..d481a22 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/cmd/NCCommandManager.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/cmd/NCCommandManager.scala
@@ -18,13 +18,11 @@
package org.apache.nlpcraft.probe.mgrs.cmd
import java.io.Serializable
-import java.util.concurrent.{ExecutorService, Executors}
import com.google.gson.Gson
import io.opencensus.trace.Span
+import org.apache.nlpcraft.common.{NCService, _}
import org.apache.nlpcraft.common.nlp.NCNlpSentence
-import org.apache.nlpcraft.common._
-import org.apache.nlpcraft.common.NCService
import org.apache.nlpcraft.model.NCToken
import org.apache.nlpcraft.probe.mgrs.NCProbeMessage
import org.apache.nlpcraft.probe.mgrs.conn.NCConnectionManager
@@ -34,7 +32,6 @@ import org.apache.nlpcraft.probe.mgrs.model.NCModelManager
import org.apache.nlpcraft.probe.mgrs.nlp.NCProbeEnrichmentManager
import scala.collection.JavaConverters._
-import scala.concurrent.{ExecutionContext, ExecutionContextExecutor}
/**
* Probe commands processor.
@@ -42,25 +39,6 @@ import scala.concurrent.{ExecutionContext,
ExecutionContextExecutor}
object NCCommandManager extends NCService {
private final val GSON = new Gson()
- @volatile private var pool: ExecutorService = _
- @volatile private var executor: ExecutionContextExecutor = _
-
- override def start(parent: Span = null): NCService =
startScopedSpan("start", parent) { _ ⇒
- pool = Executors.newCachedThreadPool()
- executor = ExecutionContext.fromExecutor(pool)
-
- super.start()
- }
-
- override def stop(parent: Span = null): Unit = startScopedSpan("stop",
parent) { _ ⇒
- super.stop()
-
- U.shutdownPools(pool)
-
- executor = null
- pool = null
- }
-
/**
*
* @param msg Server message to process.