Skip to content

Commit

Permalink
[APHL-1180] fix bad conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
taha.attari@smilecdr.com committed Dec 18, 2024
1 parent 6b51722 commit c1a3401
Showing 1 changed file with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,21 +214,19 @@ protected void handleValueSets(IBaseBundle packagedBundle, Optional<IBaseResourc
var elapsed = String.valueOf(((new Date()).getTime() - startCache) / 1000);
myLogger.info("retrieved cached ValueSet Expansions in: {}s", elapsed);
}
valueSets.forEach(valueSet -> {
missingInCache.forEach(valueSet -> {
var url = valueSet.getUrl();
if (!expandedList.contains(url)) {
var expansionStartTime = new Date().getTime();
expandHelper.expandValueSet(
valueSet,
params,
terminologyEndpoint.map(e -> (IEndpointAdapter) createAdapterForResource(e)),
valueSets,
expandedList,
new Date());
var elapsed = String.valueOf(((new Date()).getTime() - expansionStartTime) / 1000);
myLogger.info("Expanded {} in {}s", url, elapsed);
}
if (expansionCache.isPresent() && missingInCache.contains(valueSet)) {
var expansionStartTime = new Date().getTime();
expandHelper.expandValueSet(
valueSet,
params,
terminologyEndpoint.map(e -> (IEndpointAdapter) createAdapterForResource(e)),
valueSets,
expandedList,
new Date());
var elapsed = String.valueOf(((new Date()).getTime() - expansionStartTime) / 1000);
myLogger.info("Expanded {} in {}s", url, elapsed);
if (expansionCache.isPresent()) {
expansionCache.get().addToCache(valueSet, expansionParamsHash.orElse(null));
}
});
Expand Down

0 comments on commit c1a3401

Please sign in to comment.