public function hasAmqpTasksRunning($timetableId, $taskTypeId = AmqpTask::AREA_PDF_GENERATION_TYPE)
    {
        $result = $this->getEntityManager()->getRepository('CanalTPMttBundle:AmqpTask')->findBy(
            array(
                'objectId' => $timetableId,
                'status' => AmqpTask::LAUNCHED_STATUS,
                'typeId' => $taskTypeId
            )
        );

        return count($result) > 0;
    }