public function findRootJobByJobNameAndStatuses($jobName, array $statuses)
    {
        return $this->createJobQueryBuilder('job')
            ->where('job.rootJob is NULL and job.name = :jobName and job.status in (:statuses)')
            ->andWhere('job.interrupted != true')
            ->setParameter('jobName', $jobName)
            ->setParameter('statuses', $statuses)
            ->setMaxResults(1)
            ->getQuery()
            ->getOneOrNullResult();
    }