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

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


The following commit(s) were added to refs/heads/NLPCRAFT-170 by this push:
     new 4f04289  Update NCCli.scala
4f04289 is described below

commit 4f0428923328c191d851d7042c76053ae5dda38f
Author: Aaron Radzinski <[email protected]>
AuthorDate: Fri Dec 11 18:27:05 2020 -0800

    Update NCCli.scala
---
 .../apache/nlpcraft/model/tools/cmdline/NCCli.scala   | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
index 759b38b..54d2097 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
@@ -1489,6 +1489,15 @@ object NCCli extends App {
             body = cmdStopProbe
         ),
         Command(
+            name = "stop",
+            group = "1. Server & Probe Commands",
+            synopsis = s"Stops both local server & probe.",
+            desc = Some(
+                s"Both local server & probe must be started via 
${y(s"'$SCRIPT_NAME'")} or other compatible way."
+            ),
+            body = cmdStop
+        ),
+        Command(
             name = "quit",
             group = "3. REPL Commands",
             synopsis = s"Quits REPL mode.",
@@ -2483,6 +2492,16 @@ object NCCli extends App {
      * @param args Arguments, if any, for this command.
      * @param repl Whether or not executing from REPL.
      */
+    private def cmdStop(cmd: Command, args: Seq[Argument], repl: Boolean): 
Unit = {
+        doCommand(Seq(STOP_SRV_CMD.name), repl)
+        doCommand(Seq(STOP_PRB_CMD.name), repl)
+    }
+
+    /**
+     * @param cmd  Command descriptor.
+     * @param args Arguments, if any, for this command.
+     * @param repl Whether or not executing from REPL.
+     */
     private def cmdStopServer(cmd: Command, args: Seq[Argument], repl: 
Boolean): Unit =
         loadServerBeacon() match {
             case Some(beacon) ⇒

Reply via email to