Skip to content

Commit 3b5b815

Browse files
committed
Give back unfinished judging_runs/judgetasks in repeated rejudgings.
judgedaemons check in after start-up and after failed judgetask, see https://github.com/DOMjudge/domjudge/blob/2222a867f99275cbdb8e81d4681e47522a29669f/judge/judgedaemon.main.php#L984 Checking in has the side effect that judgetasks that no longer need to be executed are given back. Previously, we checked whether either the judging or the rejudging was valid, assuming that active rejudgings are marked as valid. This is not true for repeated rejudgings where only the last instance is "valid". For the check, it doesn't matter whether a rejudging is valid, only whether a judging is associated with one. Fixes #3069.
1 parent 436bcbb commit 3b5b815

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webapp/src/Controller/API/JudgehostController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function createJudgehostAction(Request $request): array
175175
->andWhere('jh.hostname = :hostname')
176176
->andWhere('j.judgingid = jt.jobid')
177177
->andWhere('jr.runresult IS NULL')
178-
->andWhere('j.valid = 1 OR r.valid = 1')
178+
->andWhere('j.valid = 1 OR j.rejudging IS NOT NULL')
179179
->andWhere('j.result != :compiler_error')
180180
->setParameter('hostname', $hostname)
181181
->setParameter('compiler_error', 'compiler-error')

0 commit comments

Comments
 (0)