[email_queue] don't run exec on each iteration (#6945)

This commit is contained in:
Ahron Greenberg (agree)
2024-04-08 16:18:42 -04:00
committed by GitHub
parent bbabb4f861
commit 199e573041

View File

@@ -138,8 +138,9 @@
//process the messages
if (is_array($email_queue) && @sizeof($email_queue) != 0) {
$which_php = exec('which php');
foreach($email_queue as $row) {
$command = exec('which php')." ".$_SERVER['DOCUMENT_ROOT']."/app/email_queue/resources/jobs/email_send.php ";
$command = $which_php." ".$_SERVER['DOCUMENT_ROOT']."/app/email_queue/resources/jobs/email_send.php ";
$command .= "'action=send&email_queue_uuid=".$row["email_queue_uuid"]."&hostname=".$hostname."'";
if (isset($debug)) {
//run process inline to see debug info