BUGFIX: health did not work anymore
This commit is contained in:
parent
aa529abb13
commit
f5e9e03353
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use App\Entity\Job;
|
||||||
use Doctrine\Persistence\ManagerRegistry;
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
|
@ -14,7 +15,7 @@ class SiteController extends AbstractController
|
||||||
public function healthAction(Request $request, ManagerRegistry $doctrine, KernelInterface $kernel)
|
public function healthAction(Request $request, ManagerRegistry $doctrine, KernelInterface $kernel)
|
||||||
{
|
{
|
||||||
$em = $doctrine->getManager();
|
$em = $doctrine->getManager();
|
||||||
$jobRepo = $em->getRepository('App:Job');
|
$jobRepo = $em->getRepository(Job::class);
|
||||||
$return = [
|
$return = [
|
||||||
"DaemonRunning" => file_exists($kernel->getCacheDir() . '/daemon-running.lock'),
|
"DaemonRunning" => file_exists($kernel->getCacheDir() . '/daemon-running.lock'),
|
||||||
"JobsTotal" => count($jobRepo->getAllJobs()),
|
"JobsTotal" => count($jobRepo->getAllJobs()),
|
||||||
|
|
Loading…
Reference in New Issue