Example #1
0
 protected function startConsole(Job $job)
 {
     /** @var EntityManager $em */
     $em = $this->getDoctrine()->getManager();
     $job->setUser($this->getUser()->getUsername());
     $job->setDone(false);
     $job->setProgress(0);
     $job->setStatus("Job intialized");
     $em->persist($job);
     $em->flush();
     return $this->redirectToRoute('job.status', ['job' => $job->getId()]);
 }