Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support deprecated bidders #169

Merged
merged 14 commits into from
Oct 30, 2018
Prev Previous commit
Next Next commit
review fixes
dhutsalo committed Oct 25, 2018
commit d5f18e331d645cd76a9878f41faa6dab798747ba
8 changes: 4 additions & 4 deletions src/main/java/org/prebid/server/auction/ExchangeService.java
Original file line number Diff line number Diff line change
@@ -159,10 +159,10 @@ public Future<BidResponse> holdAuction(BidRequest bidRequest, UidsCookie uidsCoo
// sanity check: discard imps without extension
final List<Imp> imps = imps(bidRequest);

final Map<String, List<String>> deprecatedBiddersErrors = new HashMap<>();
final Map<String, List<String>> errors = new HashMap<>();

// identify valid biddersAndErrors and aliases out of imps
final List<String> bidders = biddersAndErrors(imps, deprecatedBiddersErrors, aliases);
final List<String> bidders = biddersAndErrors(imps, errors, aliases);

return extractBidderRequests(bidRequest, imps, bidders, uidsCookie, aliases, timeout)
.map(bidderRequests ->
@@ -172,12 +172,12 @@ public Future<BidResponse> holdAuction(BidRequest bidRequest, UidsCookie uidsCoo
auctionTimeout(timeout, cacheInfo.doCaching), aliases, bidAdjustments(requestExt),
currencyRates(targeting)))
.collect(Collectors.toList())))
// send all the requests to the biddersAndErrors and gathers results
// send all the requests to the bidders and gathers results
.map(CompositeFuture::<BidderResponse>list)
// produce response from bidder results
.map(bidderResponses -> updateMetricsFromResponses(bidderResponses, publisherId))
.compose(result ->
toBidResponse(result, bidRequest, keywordsCreator, cacheInfo, timeout, deprecatedBiddersErrors))
toBidResponse(result, bidRequest, keywordsCreator, cacheInfo, timeout, errors))
.compose(bidResponse -> bidResponsePostProcessor.postProcess(bidRequest, uidsCookie, bidResponse));
}