Skip to content

Commit

Permalink
Dev/Core 25 Wrap the mailing split_job function in a transaction to e…
Browse files Browse the repository at this point in the history
…nsure that there is no possibility of duplicate maiing jobs created
  • Loading branch information
seamuslee001 committed Mar 20, 2018
1 parent 52fab18 commit e286514
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CRM/Mailing/BAO/MailingJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ public function split_job($offset = 200) {
$recipient_count = CRM_Mailing_BAO_Recipients::mailingSize($this->mailing_id);

$jobTable = CRM_Mailing_DAO_MailingJob::getTableName();

$transaction = new CRM_Core_Transaction();
$dao = new CRM_Core_DAO();

$sql = "
Expand Down Expand Up @@ -437,6 +437,7 @@ public function split_job($offset = 200) {
CRM_Core_DAO::executeQuery($sql, $params);
}
}
$transaction->commit();
}

/**
Expand Down

0 comments on commit e286514

Please sign in to comment.