Browse Source

code cleanup

pull/4753/head
Sergey Matvienko 5 years ago
parent
commit
4d08df673b
  1. 1
      application/src/main/java/org/thingsboard/server/actors/service/DefaultActorService.java
  2. 6
      application/src/main/java/org/thingsboard/server/service/script/AbstractJsInvokeService.java

1
application/src/main/java/org/thingsboard/server/actors/service/DefaultActorService.java

@ -111,7 +111,6 @@ public class DefaultActorService extends TbApplicationEventListener<PartitionCha
} else {
return ThingsBoardExecutors.newWorkStealingPool(poolSize, dispatcherName);
}
//return Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() + 1, ThingsBoardThreadFactory.forName(dispatcherName));
}
@EventListener(ApplicationReadyEvent.class)

6
application/src/main/java/org/thingsboard/server/service/script/AbstractJsInvokeService.java

@ -124,12 +124,6 @@ public abstract class AbstractJsInvokeService implements JsInvokeService {
DisableListInfo disableListInfo = disabledFunctions.computeIfAbsent(scriptId, key -> new DisableListInfo());
log.warn("Script has exception and will increment counter {} on disabledFunctions for id {}, exception {}, cause {}, scriptBody {}",
disableListInfo.get(), scriptId, t, t.getCause(), scriptBody);
// if (t instanceof TimeoutException || (t.getCause() != null && t.getCause() instanceof TimeoutException)) {
// log.warn("Script has TimeoutException and will increment counter {} on disabledFunctions for id {}", //TODO remove after test
// disableListInfo.get(),
// scriptId);
// //return; //timeout is not a good reason to disable function
// }
disableListInfo.incrementAndGet();
}

Loading…
Cancel
Save