added campaignId to query for campaign_messages

This commit is contained in:
Eric Uldall 2019-11-12 13:27:46 -08:00
parent 3a2d1512ab
commit b2bb0b642f

View file

@ -361,7 +361,7 @@ async function processCampaign(campaignId) {
} }
const subs = await knex('campaign_messages') const subs = await knex('campaign_messages')
.where({status: CampaignMessageStatus.SCHEDULED}) .where({status: CampaignMessageStatus.SCHEDULED, campaign: campaignId})
.whereNotIn('hash_email', messagesInProcessing.map(x => x.hash_email)) .whereNotIn('hash_email', messagesInProcessing.map(x => x.hash_email))
.limit(retrieveBatchSize); .limit(retrieveBatchSize);