Skip to content

Commit e3ec344

Browse files
committed
Replace magic priority values with constants
Otherwise there is a hidden dependency between the 'actual' constants, and these constants. So instead of `-9` use `JudgeTask::PRIORITY_HIGH + 1` and instead of `9` use `JudgeTask::PRIORITY_LOW - 1`. Suggested-by: Mart Pluijmaekers <[email protected]>
1 parent b14ea84 commit e3ec344

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

webapp/src/Service/ExternalContestSourceService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,9 +1905,9 @@ protected function getAnalystRunPriority(ExternalRun $run): int | null {
19051905
// We often do not get new useful information for judging correct testcases.
19061906
'correct' => null,
19071907
// Wrong answers are interesting for the analysts, assign a high priority but below manual judging.
1908-
'wrong-answer' => -9,
1908+
'wrong-answer' => JudgeTask::PRIORITY_HIGH + 1,
19091909
// Compile errors could be interesting to see what went wrong, assign a low priority.
1910-
'compiler-error' => 9,
1910+
'compiler-error' => JudgeTask::PRIORITY_LOW - 1,
19111911
// Otherwise, judge with normal priority.
19121912
default => 0,
19131913
};

0 commit comments

Comments
 (0)