Skip to content

Commit

Permalink
CDS does not provide timelimit
Browse files Browse the repository at this point in the history
We disable requiring timelimit in the event feed for the analyst
instance.
  • Loading branch information
DOMjudge team authored and meisterT committed Apr 20, 2024
1 parent 9f44e13 commit 8cf8a47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion webapp/src/DataTransferObject/Shadowing/ProblemEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ProblemEvent implements EventData
public function __construct(
public readonly string $id,
public readonly string $name,
public readonly int $timeLimit,
public readonly ?int $timeLimit,
public readonly ?string $label,
public readonly ?string $rgb,
) {}
Expand Down
5 changes: 4 additions & 1 deletion webapp/src/Service/ExternalContestSourceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -1024,9 +1024,12 @@ protected function validateAndUpdateProblem(Event $event, EventData $data): void

$toCheckProblem = [
'name' => $data->name,
'timelimit' => $data->timeLimit,
];

if ($data->timeLimit) {
$toCheckProblem['timelimit'] = $data->timeLimit;
}

if ($contestProblem->getShortname() !== $data->label) {
$this->logger->warning(
'Contest problem short name does not match between feed (%s) and local (%s), updating',
Expand Down

0 comments on commit 8cf8a47

Please sign in to comment.