Skip to content

Commit

Permalink
update dryOps method in partial import
Browse files Browse the repository at this point in the history
  • Loading branch information
AnaghHegde committed Jul 3, 2024
1 parent bf4278a commit 1f5ab41
Showing 1 changed file with 3 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,23 +249,9 @@ private Mono<BuildingBlockImportDTO> importResourceInPage(
.thenReturn(application);
});
})
// execute dry run for datasource
.flatMap(importableArtifact -> Flux.fromIterable(mappedImportableResourcesDTO
.getDatasourceDryRunQueries()
.keySet())
.flatMap(key -> dryOperationRepository.saveDatasourceToDb(mappedImportableResourcesDTO
.getDatasourceDryRunQueries()
.get(key)))
.collectList()
.thenReturn(importableArtifact))
// execute dryOps for datasourceStorage
.flatMap(importableArtifact -> Flux.fromIterable(mappedImportableResourcesDTO
.getDatasourceStorageDryRunQueries()
.keySet())
.flatMap(key -> dryOperationRepository.saveDatasourceStorageToDb(mappedImportableResourcesDTO
.getDatasourceStorageDryRunQueries()
.get(key)))
.collectList()
// execute dry run ops
.flatMap(importableArtifact -> dryOperationRepository
.executeAllDbOps(mappedImportableResourcesDTO)
.thenReturn(importableArtifact))
.flatMap(application -> {
Map<String, Object> fieldNameValueMap = Map.of(
Expand Down

0 comments on commit 1f5ab41

Please sign in to comment.