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

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


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

commit 2dd832930870dc352dc96bcd2b8add41a21b9dd8
Author: Aaron Radzinzski <[email protected]>
AuthorDate: Mon Sep 14 15:50:48 2020 -0700

    WIP.
---
 .../nlpcraft/model/tools/cmdline/NCCommandLine.scala   | 18 ++++++++++--------
 .../apache/nlpcraft/server/user/NCUserManager.scala    |  4 ++--
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCommandLine.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCommandLine.scala
index a4e8af0..2b56463 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCommandLine.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCommandLine.scala
@@ -17,10 +17,12 @@
 
 package org.apache.nlpcraft.model.tools.cmdline
 
+import org.apache.commons.lang3.SystemUtils
 import org.apache.nlpcraft.common.ascii.NCAsciiTable
 import org.apache.nlpcraft.common._
 import org.apache.nlpcraft.common.ansi.NCAnsiColor._
 import org.apache.nlpcraft.common.version.NCVersion
+
 import scala.collection.mutable
 
 /**
@@ -31,10 +33,10 @@ object NCCommandLine extends App {
 
     private final lazy val VER = NCVersion.getCurrent
     private final lazy val INSTALL_HOME = 
U.sysEnv("NLPCRAFT_CLI_INSTALL_HOME").getOrElse(
-        assert(assertion = false, "System property 'NLPCRAFT_CLI_INSTALL_HOME' 
not defined.")
+        SystemUtils.USER_DIR
     )
     private final lazy val SCRIPT_NAME = 
U.sysEnv("NLPCRAFT_CLI_SCRIPT").getOrElse(
-        assert(assertion = false, "System property 'NLPCRAFT_CLI_SCRIPT' not 
defined.")
+        s"nlpcraft.${if (SystemUtils.IS_OS_UNIX) "sh" else "cmd"}"
     )
 
     private final val T___ = "    "
@@ -258,13 +260,13 @@ object NCCommandLine extends App {
          */
         def header(): Unit = log(
             s"""|${U.asciiLogo()}
-                |${ansiBold}NAME${ansiReset}
+                |${ansiBold}NAME$ansiReset
                 |$T___$SCRIPT_NAME - command line interface to control 
NLPCraft.
                 |
-                |${ansiBold}USAGE${ansiReset}
+                |${ansiBold}USAGE$ansiReset
                 |$T___$SCRIPT_NAME [COMMAND] [PARAMETERS]
                 |
-                |${ansiBold}COMMANDS${ansiReset}""".stripMargin
+                |${ansiBold}COMMANDS$ansiReset""".stripMargin
         )
 
         /**
@@ -282,7 +284,7 @@ object NCCommandLine extends App {
 
             if (cmd.params.nonEmpty) {
                 lines += ""
-                lines += s"${ansiBold}PARAMETERS:${ansiReset}"
+                lines += s"${ansiBold}PARAMETERS:$ansiReset"
 
                 for (param ← cmd.params) {
                     val line =
@@ -291,7 +293,7 @@ object NCCommandLine extends App {
                         else
                             s"$T___${param.names.mkString(", ")}"
 
-                    lines += s"${ansiCyanFg}$line${ansiReset}"
+                    lines += s"$ansiCyanFg$line$ansiReset"
 
                     if (param.optional)
                         lines += s"$T___${T___}Optional."
@@ -305,7 +307,7 @@ object NCCommandLine extends App {
 
             if (cmd.examples.nonEmpty) {
                 lines += ""
-                lines += s"${ansiBold}EXAMPLES:${ansiReset}"
+                lines += s"${ansiBold}EXAMPLES:$ansiReset"
 
                 for (ex ← cmd.examples) {
                     lines += s"$T___${ex.code}"
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/user/NCUserManager.scala 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/user/NCUserManager.scala
index 7076caa..885f7d1 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/user/NCUserManager.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/user/NCUserManager.scala
@@ -167,8 +167,8 @@ object NCUserManager extends NCService with 
NCIgniteInstance {
 
         userLock = ignite.semaphore("userSemaphore", 1, true, true)
 
-        logger.info(s"Access tokens will be scanned for timeout every 
${Config.timeoutScannerFreqMins} min.")
-        logger.info(s"Access tokens inactive for 
${Config.accessTokenExpireTimeoutMins} min will be invalidated.")
+        logger.info(s"Access tokens will be scanned for timeout every 
${Config.timeoutScannerFreqMins}m.")
+        logger.info(s"Access tokens inactive for >= 
${Config.accessTokenExpireTimeoutMins}m will be invalidated.")
 
         super.start()
     }

Reply via email to