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

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


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

commit 017a357df4b214b29bbfc7b65d8dcf38b4f28e10
Author: Sergey Kamov <[email protected]>
AuthorDate: Tue Sep 22 16:34:19 2020 +0300

    WIP.
---
 .../nlpcraft/probe/mgrs/dialogflow/NCDialogFlowManager.scala      | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/dialogflow/NCDialogFlowManager.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/dialogflow/NCDialogFlowManager.scala
index a0f504b..1c4f9d4 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/dialogflow/NCDialogFlowManager.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/dialogflow/NCDialogFlowManager.scala
@@ -108,11 +108,7 @@ object NCDialogFlowManager extends NCService {
     def getDialogFlow(usrId: Long, mdlId: String, parent: Span = null): 
Seq[String] =
         startScopedSpan("getDialogFlow", parent, "usrId" → usrId, "mdlId" → 
mdlId) { _ ⇒
             flow.synchronized {
-                val res = flow.getOrElseUpdate(Key(usrId, mdlId), 
mutable.ArrayBuffer.empty[Value]).map(_.intent)
-
-                flow.notifyAll()
-
-                res
+                flow.getOrElseUpdate(Key(usrId, mdlId), 
mutable.ArrayBuffer.empty[Value]).map(_.intent)
             }
         }
 
@@ -166,7 +162,7 @@ object NCDialogFlowManager extends NCService {
             flow.synchronized {
                 flow -= Key(usrId, mdlId)
 
-                flow.nonEmpty
+                flow.notifyAll()
             }
         }
     

Reply via email to