CRM-12488
authorDonald A. Lobo <lobo@civicrm.org>
Wed, 1 May 2013 05:03:02 +0000 (22:03 -0700)
committerDonald A. Lobo <lobo@civicrm.org>
Wed, 1 May 2013 05:03:02 +0000 (22:03 -0700)
----------------------------------------
* CRM-12488: CiviMail delivers only 10 emails on the first round
  http://issues.civicrm.org/jira/browse/CRM-12488

CRM/Mailing/BAO/Job.php

index 5065a46d18923d2f7d1a722787d83fb489844d68..b871f4b440cd048e92b576da974618b77eef0523 100644 (file)
@@ -127,7 +127,9 @@ class CRM_Mailing_BAO_Job extends CRM_Mailing_DAO_Job {
         $job->status = CRM_Core_DAO::getFieldValue(
           'CRM_Mailing_DAO_Job',
           $job->id,
-          'status'
+          'status',
+          'id',
+          TRUE
         );
 
         if (
@@ -325,9 +327,12 @@ class CRM_Mailing_BAO_Job extends CRM_Mailing_DAO_Job {
       // Re-fetch the job status in case things
       // changed between the first query and now
       // to avoid race conditions
-      $job->status = CRM_Core_DAO::getFieldValue('CRM_Mailing_DAO_Job',
+      $job->status = CRM_Core_DAO::getFieldValue(
+        'CRM_Mailing_DAO_Job',
         $job->id,
-        'status'
+        'status',
+        'id',
+        TRUE
       );
       if ($job->status != 'Scheduled') {
         $lock->release();