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
|
@Override
|
||||||
public void pushMsgToVersionControl(TenantId tenantId, TransportProtos.ToVersionControlServiceMsg msg, TbQueueCallback callback) {
|
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);
|
log.trace("PUSHING msg: {} to:{}", msg, tpi);
|
||||||
producerProvider.getTbVersionControlMsgProducer().send(tpi, new TbProtoQueueMsg<>(tenantId.getId(), msg), callback);
|
producerProvider.getTbVersionControlMsgProducer().send(tpi, new TbProtoQueueMsg<>(tenantId.getId(), msg), callback);
|
||||||
//TODO: ashvayka
|
//TODO: ashvayka
|
||||||
|
|||||||
@ -526,12 +526,8 @@ public class DefaultEntitiesVersionControlService implements EntitiesVersionCont
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ListenableFuture<Void> deleteVersionControlSettings(TenantId tenantId) throws Exception {
|
public ListenableFuture<Void> deleteVersionControlSettings(TenantId tenantId) {
|
||||||
if (repositorySettingsService.delete(tenantId)) {
|
|
||||||
return gitServiceQueue.clearRepository(tenantId);
|
return gitServiceQueue.clearRepository(tenantId);
|
||||||
} else {
|
|
||||||
return Futures.immediateFuture(null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -65,7 +65,7 @@ public interface EntitiesVersionControlService {
|
|||||||
|
|
||||||
ListenableFuture<RepositorySettings> saveVersionControlSettings(TenantId tenantId, RepositorySettings versionControlSettings);
|
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;
|
ListenableFuture<Void> checkVersionControlAccess(TenantId tenantId, RepositorySettings settings) throws Exception;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user