From 9a8105edb95dfc02fcd342ef55031efbd72d88db Mon Sep 17 00:00:00 2001 From: afornerot Date: Fri, 19 Mar 2021 15:33:43 +0100 Subject: [PATCH] =?UTF-8?q?pr=C3=A9ciser=20le=20job=20en=20erreur=20(ref?= =?UTF-8?q?=20#245)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cadoles/CronBundle/Command/CronCommand.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ninegate-1.0/src/Cadoles/CronBundle/Command/CronCommand.php b/src/ninegate-1.0/src/Cadoles/CronBundle/Command/CronCommand.php index d9dccff0..086df48e 100644 --- a/src/ninegate-1.0/src/Cadoles/CronBundle/Command/CronCommand.php +++ b/src/ninegate-1.0/src/Cadoles/CronBundle/Command/CronCommand.php @@ -145,7 +145,7 @@ class CronCommand extends ContainerAwareCommand if($cron->getRepeatcall()>0) $cron->setRepeatexec($cron->getRepeatexec()+1); // Envoyer un mail à l'ensemble des administrateurs - $this->sendMailerror(); + $this->sendMailerror($cron); } } @@ -161,7 +161,7 @@ class CronCommand extends ContainerAwareCommand } } - private function sendMailerror() { + private function sendMailerror($cron) { $appname=""; $config = $this->em->getRepository("CadolesCoreBundle:Config")->findOneBy(["id"=>"appname"]); if($config) $appname = $config->getValue(); @@ -184,8 +184,8 @@ class CronCommand extends ContainerAwareCommand $mail_params=array( "subject" => $appname." : ERREUR SUR EXECUTION JOB", - "body_html"=> "ATTENTION UN JOB EST EN ERREUR. MERCI DE VERIFIER LES LOGS.", - "body_text"=> "ATTENTION UN JOB EST EN ERREUR. MERCI DE VERIFIER LES LOGS." + "body_html"=> "ATTENTION UN JOB EST EN ERREUR. MERCI DE VERIFIER LES LOGS.
Command = ".$cron->getCommand()."
Description = ".$cron->getDescription(), + "body_text"=> "ATTENTION UN JOB EST EN ERREUR. MERCI DE VERIFIER LES LOGS.\nCommand = ".$cron->getCommand()."\nDescription = ".$cron->getDescription() ); $message = $this->container->get('cadoles.core.service.mail');