Created
May 12, 2016 15:40
-
-
Save i-van/f9b4324bd9d896172891ce569106f57a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 'use strict'; | |
| let BaseTask = require('./base') | |
| , BaseNetwork = require('../networks/base'); | |
| class BlacklistTask extends BaseTask { | |
| async run() { | |
| if (process.env.DRY_RUN === 'true') { | |
| return; | |
| } | |
| let campaign = await this.getCampaign() | |
| , network = await BaseNetwork.factory(campaign.data.trafficSource.name); | |
| campaign.targetingZone = await network.excludeZones(campaign.data.url, this.params.zones); | |
| await campaign.save(); | |
| } | |
| } | |
| module.exports = BlacklistTask; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment