Fix repository cleanup on tenant deletion
This commit is contained in:
parent
656e8458ad
commit
e000761fac
@ -165,7 +165,7 @@ public class DefaultTbClusterService implements TbClusterService {
|
||||
|
||||
@Override
|
||||
public void pushMsgToVersionControl(TenantId tenantId, TransportProtos.ToVersionControlServiceMsg msg, TbQueueCallback callback) {
|
||||
TopicPartitionInfo tpi = partitionService.resolve(ServiceType.TB_VC_EXECUTOR, tenantId, tenantId);
|
||||
TopicPartitionInfo tpi = partitionService.resolve(ServiceType.TB_VC_EXECUTOR, TenantId.SYS_TENANT_ID, tenantId);
|
||||
log.trace("PUSHING msg: {} to:{}", msg, tpi);
|
||||
producerProvider.getTbVersionControlMsgProducer().send(tpi, new TbProtoQueueMsg<>(tenantId.getId(), msg), callback);
|
||||
//TODO: ashvayka
|
||||
|
||||
@ -526,12 +526,8 @@ public class DefaultEntitiesVersionControlService implements EntitiesVersionCont
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<Void> deleteVersionControlSettings(TenantId tenantId) throws Exception {
|
||||
if (repositorySettingsService.delete(tenantId)) {
|
||||
return gitServiceQueue.clearRepository(tenantId);
|
||||
} else {
|
||||
return Futures.immediateFuture(null);
|
||||
}
|
||||
public ListenableFuture<Void> deleteVersionControlSettings(TenantId tenantId) {
|
||||
return gitServiceQueue.clearRepository(tenantId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -65,7 +65,7 @@ public interface EntitiesVersionControlService {
|
||||
|
||||
ListenableFuture<RepositorySettings> saveVersionControlSettings(TenantId tenantId, RepositorySettings versionControlSettings);
|
||||
|
||||
ListenableFuture<Void> deleteVersionControlSettings(TenantId tenantId) throws Exception;
|
||||
ListenableFuture<Void> deleteVersionControlSettings(TenantId tenantId);
|
||||
|
||||
ListenableFuture<Void> checkVersionControlAccess(TenantId tenantId, RepositorySettings settings) throws Exception;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user