Skip to content

Commit 27cc4ad

Browse files
committed
Fetch either debug or generic tasks first
1 parent 923849b commit 27cc4ad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

webapp/src/Controller/API/JudgehostController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,9 +1581,10 @@ public function getJudgeTasksAction(Request $request): array
15811581
->andWhere('jt.judgehost = :judgehost')
15821582
->andWhere('jt.starttime IS NULL')
15831583
->andWhere('jt.valid = 1')
1584-
->andWhere('jt.type = :type')
1584+
->andWhere('jt.type in (:type)')
15851585
->setParameter('judgehost', $judgehost)
1586-
->setParameter('type', JudgeTaskType::DEBUG_INFO)
1586+
->setParameter('type', [JudgeTaskType::DEBUG_INFO, JudgeTaskType::GENERIC_TASK],
1587+
ArrayParameterType::STRING)
15871588
->addOrderBy('jt.priority')
15881589
->addOrderBy('jt.judgetaskid')
15891590
->setMaxResults(1)

0 commit comments

Comments
 (0)