BUGFIX: health did not work anymore

This commit is contained in:
Jeroen De Meerleer 2022-05-06 11:42:41 +02:00
parent aa529abb13
commit f5e9e03353
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
namespace App\Controller;
use App\Entity\Job;
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
@ -14,7 +15,7 @@ class SiteController extends AbstractController
public function healthAction(Request $request, ManagerRegistry $doctrine, KernelInterface $kernel)
{
$em = $doctrine->getManager();
$jobRepo = $em->getRepository('App:Job');
$jobRepo = $em->getRepository(Job::class);
$return = [
"DaemonRunning" => file_exists($kernel->getCacheDir() . '/daemon-running.lock'),
"JobsTotal" => count($jobRepo->getAllJobs()),