@@ -613,49 +613,6 @@ public function viewAction(
613613 return $ this ->render ('jury/submission.html.twig ' , $ twigData );
614614 }
615615
616- /**
617- * @return JudgeTask[]|null
618- */
619- private function getJudgetasks (string |int |null $ jobId , int $ max_batchsize , Judgehost $ judgehost ): ?array
620- {
621- if ($ jobId === null ) {
622- return null ;
623- }
624- $ queryBuilder = $ this ->em ->createQueryBuilder ();
625- /** @var JudgeTask[] $judgetasks */
626- $ judgetasks = $ queryBuilder
627- ->from (JudgeTask::class, 'jt ' )
628- ->select ('jt ' )
629- ->andWhere ('jt.judgehost IS NULL ' )
630- ->andWhere ('jt.valid = 1 ' )
631- ->andWhere ('jt.jobid = :jobid ' )
632- ->andWhere ('jt.type = :type ' )
633- ->addOrderBy ('jt.priority ' )
634- ->addOrderBy ('jt.judgetaskid ' )
635- ->setParameter ('type ' , JudgeTaskType::JUDGING_RUN )
636- ->setParameter ('jobid ' , $ jobId )
637- ->setMaxResults ($ max_batchsize )
638- ->getQuery ()
639- ->getResult ();
640- if (empty ($ judgetasks )) {
641- // TODO: There is currently a race condition when a jury member requests the remaining test cases to be
642- // judged in the time between allocating the final batch and the next judgehost checking in and deleting
643- // the queuetask here.
644- $ this ->em ->createQueryBuilder ()
645- ->from (QueueTask::class, 'qt ' )
646- ->andWhere ('qt.judging = :jobid ' )
647- ->setParameter ('jobid ' , $ jobId )
648- ->delete ()
649- ->getQuery ()
650- ->execute ();
651- $ this ->em ->flush ();
652- $ this ->dj ->auditlog ('queuetask ' , $ jobId , 'deleted ' );
653- } else {
654- return $ this ->serializeJudgeTasks ($ judgetasks , $ judgehost );
655- }
656- return null ;
657- }
658-
659616 #[Route(path: '/request-full-debug/{jid} ' , name: 'request_full_debug ' )]
660617 public function requestFullDebug (Request $ request , Judging $ jid ): RedirectResponse
661618 {
0 commit comments