Created
January 29, 2013 18:20
-
-
Save fforbeck/4666347 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
function resumeDomainsFromCampaign(campaign) { | |
var cursorAds = db.rtb_bid_reference.find({campaign_id: campaign}, {id: 1}); | |
var rtbBidRefDomainColl = db.rtb_bid_reference_domain; | |
while (cursorAds.hasNext()) { | |
var adId = cursorAds.next(); | |
if (adId != null) { | |
print('Resuming Ad ' + adId.id); | |
rtbBidRefDomainColl.update({ad_id: adId.id}, {$set: {weight: 1}}, false, true); | |
print('All domains were resumed for Ad ' + adId.id); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment