Skip to content

Commit

Permalink
Ignore the map-info event in the event feed
Browse files Browse the repository at this point in the history
Similarly to the other ignored event types, we need to drop this event
to successfully parse the event feed of external sources.
  • Loading branch information
Kevinjil authored and meisterT committed Apr 20, 2024
1 parent 9f44e13 commit 06ea5fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions webapp/src/DataTransferObject/Shadowing/EventType.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ enum EventType: string
case JUDGEMENTS = 'judgements';
case JUDGEMENT_TYPES = 'judgement-types';
case LANGUAGES = 'languages';
case MAP_INFO = 'map-info';
case ORGANIZATIONS = 'organizations';
case PERSONS = 'persons';
case PROBLEMS = 'problems';
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/Service/ExternalContestSourceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ public function importEvent(Event $event, array $eventsToSkip): void

// Note the @vars here are to make PHPStan understand the correct types.
$method = match ($event->type) {
EventType::AWARDS, EventType::TEAM_MEMBERS, EventType::ACCOUNTS, EventType::PERSONS => $this->ignoreEvent(...),
EventType::ACCOUNTS, EventType::AWARDS, EventType::MAP_INFO, EventType::PERSONS, EventType::TEAM_MEMBERS => $this->ignoreEvent(...),
EventType::STATE => $this->validateState(...),
EventType::CONTESTS => $this->validateAndUpdateContest(...),
EventType::JUDGEMENT_TYPES => $this->importJudgementType(...),
Expand Down

0 comments on commit 06ea5fc

Please sign in to comment.