Skip to content

Commit

Permalink
Price Floors: Fix always inprogress bug (#1918)
Browse files Browse the repository at this point in the history
  • Loading branch information
Compile-Ninja authored Jun 23, 2022
1 parent 895b239 commit 4d241d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/prebid/server/floors/PriceFloorFetcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,12 @@ private PriceFloorData updateCache(ResponseCacheInfo cacheInfo,
final AccountFetchContext fetchContext =
AccountFetchContext.of(cacheInfo.getRulesData(), cacheInfo.getFetchStatus(), maxAgeTimerId);

if (cacheInfo.getRulesData() != null || !fetchedData.containsKey(accountId)) {
if (cacheInfo.getFetchStatus() == FetchStatus.success || !fetchedData.containsKey(accountId)) {
fetchedData.put(accountId, fetchContext);
fetchInProgress.remove(accountId);
}

fetchInProgress.remove(accountId);

return fetchContext.getRulesData();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ public class PriceFloorFetcherTest extends VertxTest {
@Before
public void setUp() {
debugProperties = new PriceFloorDebugProperties();
priceFloorFetcher = new PriceFloorFetcher(applicationSettings,
priceFloorFetcher = new PriceFloorFetcher(
applicationSettings,
metrics,
vertx,
timeoutFactory,
Expand Down

0 comments on commit 4d241d2

Please sign in to comment.