Merge pull request #775 from ericuldall/fix-multiple-campaign-error

Fixes issue sending multiple campaigns
This commit is contained in:
Tomas Bures 2019-11-12 23:31:34 +02:00 committed by GitHub
commit 97910a2efa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);