refactoring
This commit is contained in:
parent
d25f271d89
commit
e59c4a950c
@ -94,7 +94,6 @@ import org.thingsboard.server.service.queue.processing.IdMsgPair;
|
||||
import org.thingsboard.server.service.resource.TbImageService;
|
||||
import org.thingsboard.server.service.rpc.TbCoreDeviceRpcService;
|
||||
import org.thingsboard.server.service.security.auth.jwt.settings.JwtSettingsService;
|
||||
import org.thingsboard.server.service.security.model.token.JwtTokenFactory;
|
||||
import org.thingsboard.server.service.state.DeviceStateService;
|
||||
import org.thingsboard.server.service.subscription.SubscriptionManagerService;
|
||||
import org.thingsboard.server.service.subscription.TbLocalSubscriptionService;
|
||||
@ -173,12 +172,11 @@ public class DefaultTbCoreConsumerService extends AbstractConsumerService<ToCore
|
||||
PartitionService partitionService,
|
||||
ApplicationEventPublisher eventPublisher,
|
||||
JwtSettingsService jwtSettingsService,
|
||||
JwtTokenFactory jwtTokenFactory,
|
||||
NotificationSchedulerService notificationSchedulerService,
|
||||
NotificationRuleProcessor notificationRuleProcessor,
|
||||
TbImageService imageService) {
|
||||
super(actorContext, tenantProfileCache, deviceProfileCache, assetProfileCache, apiUsageStateService, partitionService,
|
||||
eventPublisher, tbCoreQueueFactory.createToCoreNotificationsMsgConsumer(), jwtSettingsService, jwtTokenFactory);
|
||||
eventPublisher, tbCoreQueueFactory.createToCoreNotificationsMsgConsumer(), jwtSettingsService);
|
||||
this.mainConsumer = tbCoreQueueFactory.createToCoreMsgConsumer();
|
||||
this.usageStatsConsumer = tbCoreQueueFactory.createToUsageStatsServiceMsgConsumer();
|
||||
this.firmwareStatesConsumer = tbCoreQueueFactory.createToOtaPackageStateServiceMsgConsumer();
|
||||
|
||||
@ -56,7 +56,6 @@ import org.thingsboard.server.service.rpc.TbRuleEngineDeviceRpcService;
|
||||
import org.thingsboard.server.service.security.auth.jwt.settings.JwtSettingsService;
|
||||
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import org.thingsboard.server.service.security.model.token.JwtTokenFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -88,10 +87,9 @@ public class DefaultTbRuleEngineConsumerService extends AbstractConsumerService<
|
||||
TbApiUsageStateService apiUsageStateService,
|
||||
PartitionService partitionService,
|
||||
ApplicationEventPublisher eventPublisher,
|
||||
JwtSettingsService jwtSettingsService,
|
||||
JwtTokenFactory jwtTokenFactory) {
|
||||
JwtSettingsService jwtSettingsService) {
|
||||
super(actorContext, tenantProfileCache, deviceProfileCache, assetProfileCache, apiUsageStateService, partitionService,
|
||||
eventPublisher, tbRuleEngineQueueFactory.createToRuleEngineNotificationsMsgConsumer(), jwtSettingsService, jwtTokenFactory);
|
||||
eventPublisher, tbRuleEngineQueueFactory.createToRuleEngineNotificationsMsgConsumer(), jwtSettingsService);
|
||||
this.ctx = ctx;
|
||||
this.tbDeviceRpcService = tbDeviceRpcService;
|
||||
this.queueService = queueService;
|
||||
|
||||
@ -77,7 +77,6 @@ public abstract class AbstractConsumerService<N extends com.google.protobuf.Gene
|
||||
|
||||
protected final TbQueueConsumer<TbProtoQueueMsg<N>> nfConsumer;
|
||||
protected final JwtSettingsService jwtSettingsService;
|
||||
protected final JwtTokenFactory jwtTokenFactory;
|
||||
|
||||
public void init(String nfConsumerThreadName) {
|
||||
this.notificationsConsumerExecutor = Executors.newSingleThreadExecutor(ThingsBoardThreadFactory.forName(nfConsumerThreadName));
|
||||
@ -166,7 +165,6 @@ public abstract class AbstractConsumerService<N extends com.google.protobuf.Gene
|
||||
} else if (EntityType.TENANT.equals(componentLifecycleMsg.getEntityId().getEntityType())) {
|
||||
if (TenantId.SYS_TENANT_ID.equals(tenantId)) {
|
||||
jwtSettingsService.reloadJwtSettings();
|
||||
jwtTokenFactory.reload();
|
||||
return;
|
||||
} else {
|
||||
tenantProfileCache.evict(tenantId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user