Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[DLAB-1230] Fixed billing issues [Azure] #392

Merged
merged 4 commits into from Nov 12, 2019
Merged

Conversation

ofuks
Copy link
Contributor

@ofuks ofuks commented Nov 11, 2019

No description provided.

.collect(Collectors.toMap(key -> key.getString("name").toLowerCase(),
value -> (List<Document>) value.get("endpoints")));

projectEndpoints.forEach((key, value) -> value.forEach(endpoint -> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls name vars accordingly: e.g. key - projectName, value -> endpoints

Comment on lines 169 to 176
projectEndpoints.forEach((key, value) -> value.forEach(endpoint -> {
try {
billableResources.addAll(getEdgeAndStorageAccount(key, objectMapper.readValue(
objectMapper.writeValueAsString(endpoint.get("edgeInfo")),
new com.fasterxml.jackson.core.type.TypeReference<EdgeInfoAzure>() {
})));
} catch (IOException ex) {
log.error("Error during preparation of billable resources", ex);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is better to use stream api here than foreach inside foreach:
billableResources.addAll(
l,stream()
.map (d -> EdgeInfoAzure)
.collect(toList()))

@EpamBohdanHliva EpamBohdanHliva merged commit 1b0e962 into v2.2-RC1 Nov 12, 2019
@ofuks ofuks deleted the DLAB-1230 branch May 5, 2020 10:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants