préciser le job en erreur (ref #245)
This commit is contained in:
parent
26d31f4fce
commit
9a8105edb9
|
@ -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.<br>Command = ".$cron->getCommand()."<br>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');
|
||||
|
|
Loading…
Reference in New Issue