Skip to content

Commit

Permalink
Merge pull request eclipse-tractusx#508 from catenax-ng/feature/TRI-1…
Browse files Browse the repository at this point in the history
…570-adjustments-when-job-running

feat(impl):[TRI-1570] update improvment
  • Loading branch information
ds-ext-kmassalski authored Aug 30, 2023
2 parents c262bd2 + c19ca30 commit 2a2f9aa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import lombok.Getter;
import lombok.Singular;
import lombok.extern.jackson.Jacksonized;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.tractusx.irs.component.Bpn;
import org.eclipse.tractusx.irs.component.Relationship;
import org.eclipse.tractusx.irs.component.Submodel;
Expand Down Expand Up @@ -60,4 +61,8 @@ public class ItemContainer {

@Singular
private List<RequestMetric> metrics;

public List<Bpn> getBpnsWithManufacturerName() {
return this.getBpns().stream().filter(bpn -> StringUtils.isNotBlank(bpn.getManufacturerName())).toList();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.tractusx.irs.component.Bpn;
import org.eclipse.tractusx.irs.component.Relationship;
import org.eclipse.tractusx.irs.component.Submodel;
Expand Down Expand Up @@ -65,7 +64,7 @@ public class ItemTreesAssembler {
tombstones.addAll(itemGraph.getTombstones());
shells.addAll(itemGraph.getShells());
submodels.addAll(itemGraph.getSubmodels());
bpns.addAll(itemGraph.getBpns().stream().filter(bpn -> StringUtils.isNotBlank(bpn.getManufacturerName())).toList());
bpns.addAll(itemGraph.getBpnsWithManufacturerName());
});

log.info("Assembled item graph from {} partial graphs", numberOfPartialTrees);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ private ItemContainer retrievePartialResults(final MultiTransferJob multiJob) {
shells.addAll(itemContainer.getShells());
submodels.addAll(itemContainer.getSubmodels());
metrics.addAll(itemContainer.getMetrics());
bpns.addAll(itemContainer.getBpns());
bpns.addAll(itemContainer.getBpnsWithManufacturerName());
});

} catch (BlobPersistenceException e) {
Expand Down

0 comments on commit 2a2f9aa

Please sign in to comment.