Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-12996

Only 10 emails get sent on first mailing triggered by cron.

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 4.2.2, 4.3.1
    • Fix Version/s: None
    • Component/s: CiviMail
    • Labels:
      None

      Description

      After scheduling a mailing, on the first run triggered by a cron only 10 emails get sent.

      I've investigated and figured out the problem is that the status for the mailing is getting cached and then later code is looking at the cached version instead of the updated version.

      In more detail:

      CRM_Core_DAO::getFieldValue uses a cached value by default, so an earlier call call to this function for the mailing status cached the value 'Scheduled', but really the current status is 'Running'. Then when there is a check to see if the job has been cancelled (i.e. no longer 'Running') the check sees the cached 'Scheduled' value and so thinks the job has been cancelled. So we should not use the cached value when deciding whether we should exit early.

      I've included a patch against 4.2.2.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              peterh Peter Haight
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: