Skip to content

Commit

Permalink
Batched budget reauthorization feature has been fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
gavryliuk committed Dec 4, 2014
1 parent 681b6c2 commit 0892266
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rtbkit/core/banker/slave_banker.cc
Expand Up @@ -464,7 +464,7 @@ reauthorizeBudgetBatched(uint64_t numTimeoutsExpired)

Json::Value request;
auto onAccount = [&](const AccountKey& key, const ShadowAccount& Account) {
request[key.toString()] = body;
request[getShadowAccountStr(key)] = body;
};
accounts.forEachInitializedAndActiveAccount(onAccount);

Expand Down Expand Up @@ -497,7 +497,7 @@ onReauthorizeBudgetBatchedResponse(
Json::Value response = Json::parse(payload);
for (const auto& key : response.getMemberNames()) {
auto account = Account::fromJson(response[key]);
accounts.syncFromMaster(AccountKey(key), account);
accounts.syncFromMaster(AccountKey(key).parent()), account);
}

lastReauthorize = Date::now();
Expand Down

0 comments on commit 0892266

Please sign in to comment.