thingsboard-memoizeit

Few minor improvements

10/26/2018 6:07:15 AM

Details

diff --git a/application/src/main/java/org/thingsboard/server/actors/service/DefaultActorService.java b/application/src/main/java/org/thingsboard/server/actors/service/DefaultActorService.java
index c2e8fd0..542a82f 100644
--- a/application/src/main/java/org/thingsboard/server/actors/service/DefaultActorService.java
+++ b/application/src/main/java/org/thingsboard/server/actors/service/DefaultActorService.java
@@ -66,10 +66,7 @@ public class DefaultActorService implements ActorService {
     public static final String APP_DISPATCHER_NAME = "app-dispatcher";
     public static final String CORE_DISPATCHER_NAME = "core-dispatcher";
     public static final String SYSTEM_RULE_DISPATCHER_NAME = "system-rule-dispatcher";
-    public static final String SYSTEM_PLUGIN_DISPATCHER_NAME = "system-plugin-dispatcher";
     public static final String TENANT_RULE_DISPATCHER_NAME = "rule-dispatcher";
-    public static final String TENANT_PLUGIN_DISPATCHER_NAME = "plugin-dispatcher";
-    public static final String SESSION_DISPATCHER_NAME = "session-dispatcher";
     public static final String RPC_DISPATCHER_NAME = "rpc-dispatcher";
 
     @Autowired
@@ -186,8 +183,8 @@ public class DefaultActorService implements ActorService {
     @Override
     public void onReceivedMsg(ServerAddress source, ClusterAPIProtos.ClusterMessage msg) {
         ServerAddress serverAddress = new ServerAddress(source.getHost(), source.getPort(), source.getServerType());
-        log.info("Received msg [{}] from [{}]", msg.getMessageType().name(), serverAddress);
         if (log.isDebugEnabled()) {
+            log.info("Received msg [{}] from [{}]", msg.getMessageType().name(), serverAddress);
             log.info("MSG: ", msg);
         }
         switch (msg.getMessageType()) {
diff --git a/application/src/main/resources/actor-system.conf b/application/src/main/resources/actor-system.conf
index 3c68775..763319e 100644
--- a/application/src/main/resources/actor-system.conf
+++ b/application/src/main/resources/actor-system.conf
@@ -92,7 +92,7 @@ core-dispatcher {
   throughput = 5
 }
 
-# This dispatcher is used for system rule actors
+# This dispatcher is used for system rule chains and rule node actors
 system-rule-dispatcher {
   type = Dispatcher
   executor = "fork-join-executor"
@@ -115,30 +115,7 @@ system-rule-dispatcher {
   throughput = 5
 }
 
-# This dispatcher is used for system plugin actors
-system-plugin-dispatcher {
-  type = Dispatcher
-  executor = "fork-join-executor"
-  fork-join-executor {
-    # Min number of threads to cap factor-based parallelism number to
-    parallelism-min = 2
-    # Max number of threads to cap factor-based parallelism number to
-    parallelism-max = 12
-
-    # The parallelism factor is used to determine thread pool size using the
-    # following formula: ceil(available processors * factor). Resulting size
-    # is then bounded by the parallelism-min and parallelism-max values.
-    parallelism-factor = 0.25
-  }
-  # How long time the dispatcher will wait for new actors until it shuts down
-  shutdown-timeout = 1s
-
-  # Throughput defines the number of messages that are processed in a batch
-  # before the thread is returned to the pool. Set to 1 for as fair as possible.
-  throughput = 5
-}
-
-# This dispatcher is used for tenant rule actors
+# This dispatcher is used for tenant rule chains and rule node actors
 rule-dispatcher {
   type = Dispatcher
   executor = "fork-join-executor"
@@ -160,50 +137,3 @@ rule-dispatcher {
   # before the thread is returned to the pool. Set to 1 for as fair as possible.
   throughput = 5
 }
-
-# This dispatcher is used for tenant plugin actors
-plugin-dispatcher {
-  type = Dispatcher
-  executor = "fork-join-executor"
-  fork-join-executor {
-      # Min number of threads to cap factor-based parallelism number to
-      parallelism-min = 2
-      # Max number of threads to cap factor-based parallelism number to
-      parallelism-max = 12
-
-      # The parallelism factor is used to determine thread pool size using the
-      # following formula: ceil(available processors * factor). Resulting size
-      # is then bounded by the parallelism-min and parallelism-max values.
-      parallelism-factor = 0.25
-  }
-  # How long time the dispatcher will wait for new actors until it shuts down
-  shutdown-timeout = 1s
-
-  # Throughput defines the number of messages that are processed in a batch
-  # before the thread is returned to the pool. Set to 1 for as fair as possible.
-  throughput = 5
-}
-
-
-# This dispatcher is used for rule actors
-session-dispatcher {
-  type = Dispatcher
-  executor = "fork-join-executor"
-  fork-join-executor {
-      # Min number of threads to cap factor-based parallelism number to
-      parallelism-min = 2
-      # Max number of threads to cap factor-based parallelism number to
-      parallelism-max = 12
-
-      # The parallelism factor is used to determine thread pool size using the
-      # following formula: ceil(available processors * factor). Resulting size
-      # is then bounded by the parallelism-min and parallelism-max values.
-      parallelism-factor = 0.25
-  }
-  # How long time the dispatcher will wait for new actors until it shuts down
-  shutdown-timeout = 1s
-
-  # Throughput defines the number of messages that are processed in a batch
-  # before the thread is returned to the pool. Set to 1 for as fair as possible.
-  throughput = 5
-}
\ No newline at end of file
diff --git a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/debug/TbMsgGeneratorNodeConfiguration.java b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/debug/TbMsgGeneratorNodeConfiguration.java
index c568e3d..e3766ba 100644
--- a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/debug/TbMsgGeneratorNodeConfiguration.java
+++ b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/debug/TbMsgGeneratorNodeConfiguration.java
@@ -37,7 +37,7 @@ public class TbMsgGeneratorNodeConfiguration implements NodeConfiguration<TbMsgG
         configuration.setPeriodInSeconds(1);
         configuration.setJsScript("var msg = { temp: 42, humidity: 77 };\n" +
                 "var metadata = { data: 40 };\n" +
-                "var msgType = \"DebugMsg\";\n\n" +
+                "var msgType = \"POST_TELEMETRY_REQUEST\";\n\n" +
                 "return { msg: msg, metadata: metadata, msgType: msgType };");
         return configuration;
     }
diff --git a/ui/src/app/rulechain/script/node-script-test.tpl.html b/ui/src/app/rulechain/script/node-script-test.tpl.html
index e5fb9c3..e7f50cc 100644
--- a/ui/src/app/rulechain/script/node-script-test.tpl.html
+++ b/ui/src/app/rulechain/script/node-script-test.tpl.html
@@ -98,7 +98,7 @@
                                              validate-content="false"
                                              ng-readonly="true"
                                              fill-height="true">
-                            </tb-json-content>generateReport
+                            </tb-json-content>
                         </div>
                     </div>
                 </div>