Kaynağa Gözat

[backend] Cron : ajout log par email

refactoring
Guillaume 4 yıl önce
ebeveyn
işleme
d3e26c802e
1 değiştirilmiş dosya ile 10 ekleme ve 1 silme
  1. +10
    -1
      backend/controllers/CronController.php

+ 10
- 1
backend/controllers/CronController.php Dosyayı Görüntüle

@@ -231,7 +231,16 @@ class CronController extends BackendController
}
if($producer->active) {
Yii::error($producer->name.' : Distribution du '.$date.', '.count($arrayOrders).' commande(s) enregistrée(s), '.$countOrders.' commande(s) payée(s), '.($mailOrdersSend ? 'Récapitulatif de commandes envoyé' : 'Aucun email envoyé'), 'cron-process-orders') ;
$messageLog = $producer->name.' : Distribution du '.$date.', '.count($arrayOrders).' commande(s) enregistrée(s), '.$countOrders.' commande(s) payée(s), '.($mailOrdersSend ? 'Récapitulatif de commandes envoyé' : 'Aucun email envoyé') ;

Yii::$app->mailer->compose()
->setFrom('contact@opendistrib.net')
->setTo('contact@opendistrib.net')
->setSubject('[Opendistrib] Log cron')
->setTextBody($messageLog)
->send();

Yii::error($messageLog, 'cron-process-orders') ;
}
}
}

Yükleniyor…
İptal
Kaydet