/** * On job error * * @param JobEvent $event */ public function onJobError(JobEvent $event) { if ($this->enable) { $job = $event->getJob(); if (!$job) { return; } if (!$job->getEmail()) { return; } $errorMessage = $this->translator->trans("Job with id '" . $job->getId() . "' failed"); $subject = ($this->platformName ? $this->platformName . ': ' : '') . $errorMessage; $template = 'PumukitNotificationBundle:Email:job.html.twig'; $parameters = array('subject' => $subject, 'job_status' => Job::$statusTexts[$job->getStatus()], 'job' => $job, 'commandLine' => $this->jobService->renderBat($job), 'sender_name' => $this->senderName); $output = $this->senderService->sendNotification($job->getEmail(), $subject, $template, $parameters, true); return $output; } }
public function onJobSuccess(JobEvent $event) { $this->checkMultimediaObject($event->getMultimediaObject()); }
public function onJobSuccess(JobEvent $event) { $this->generatePic($event->getMultimediaObject(), $event->getTrack()); }