added @Lazy to PubSubRuleNodeExecutorProvider
This commit is contained in:
parent
fbec7aab25
commit
66b768a499
@ -323,6 +323,7 @@ public class ActorSystemContext {
|
||||
@Getter
|
||||
private NotificationExecutorService notificationExecutor;
|
||||
|
||||
@Lazy
|
||||
@Autowired
|
||||
@Getter
|
||||
private PubSubRuleNodeExecutorProvider pubSubRuleNodeExecutorProvider;
|
||||
|
||||
@ -16,15 +16,19 @@
|
||||
package org.thingsboard.server.service.executors;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.thingsboard.common.util.ExecutorProvider;
|
||||
import org.thingsboard.common.util.ThingsBoardThreadFactory;
|
||||
import org.thingsboard.server.queue.util.TbRuleEngineComponent;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
@Lazy
|
||||
@TbRuleEngineComponent
|
||||
@Component
|
||||
public class PubSubRuleNodeExecutorProvider implements ExecutorProvider {
|
||||
|
||||
@ -53,7 +57,7 @@ public class PubSubRuleNodeExecutorProvider implements ExecutorProvider {
|
||||
@PreDestroy
|
||||
private void destroy() {
|
||||
if (executor != null) {
|
||||
executor.shutdown();
|
||||
executor.shutdownNow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ public class TbPubSubQueueExecutorProvider implements ExecutorProvider {
|
||||
@PreDestroy
|
||||
private void destroy() {
|
||||
if (executor != null) {
|
||||
executor.shutdown();
|
||||
executor.shutdownNow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user