Created
June 3, 2013 16:18
-
-
Save pbogunovich/5699292 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void disableCampaignForDailyBudgetReachedIfNeeded( | |
Constrainable campaign, Long newSpend, Long snapSpentMicros) { | |
/* | |
* Checking if campaign is over daily budget. Disable if necessary. | |
*/ | |
if (!constraintCheckingService.isCampaignDisabled(campaign) | |
&& constraintCheckingService.isDailyBudgetReached(campaign, newSpend, | |
snapSpentMicros)) { | |
disablingService.disableCampaignForDailyBudgetReached(campaign); | |
LOGGER.debug("Disabling campaign ({}), for daily budget reached", | |
campaign.getUniqueId()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment