Log sending of Scheduled Reminders
authorMathieu Lutfy <mathieu@symbiotic.coop>
Mon, 27 Mar 2023 16:08:57 +0000 (12:08 -0400)
committerMathieu Lutfy <mathieu@bidon.ca>
Mon, 27 Mar 2023 16:19:18 +0000 (12:19 -0400)
They are a pain to debug when they fail because of errors with smarty or tokens

CRM/Core/BAO/ActionSchedule.php

index c63492d1470cf588c8fcd3d8f583ce1d38c22e76..dbbeeac111889c39e925d1cc25226761e4e995e2 100644 (file)
@@ -252,6 +252,10 @@ FROM civicrm_action_schedule cas
         [1 => [$actionSchedule->id, 'Integer']]
       );
 
+      if ($dao->N > 0) {
+        Civi::log()->info("Sending Scheduled Reminder {$actionSchedule->id} to {$dao->N} recipients");
+      }
+
       $multilingual = CRM_Core_I18n::isMultilingual();
       $tokenProcessor = self::createTokenProcessor($actionSchedule, $mapping);
       while ($dao->fetch()) {