feat(infobox): do not query for matchticker on finished events in infobox league#6958
feat(infobox): do not query for matchticker on finished events in infobox league#6958
Conversation
| FINISHED = 'Finished Tournaments' | ||
| } | ||
|
|
||
| local tournamentPhase = TournamentService.tournamentFromRecord(self.lpdbData).phase |
There was a problem hiding this comment.
Can't we just reuse this logic?
There was a problem hiding this comment.
See #6958 (comment)
Basically, when a tournament runs past midnight on enddate, the matchticker would stop working with that.(Tournament.phase is enddate inclusive, this is enddate inclusive + 1 day)
Since phase is also used on Tournaments Ticker, that's intended and cannot really be adjusted without looking bad there.
There was a problem hiding this comment.
Then we should probably adjust the logic elsewhere too
There was a problem hiding this comment.
Which 'elsewhere' are you referring to?
There was a problem hiding this comment.
The category, the tournament ticker, the generator to the tournament dropdown, there might be other places too
There was a problem hiding this comment.
All these places are fine with the current phase calculation, that's exactly why we cannot adjust it and instead copy+slightly tweak it here.
You would not want to have every tournament that ends on a sunday to be still "ongoing" on monday because some matches might cross the date boundary in the night.
You do want to have the matchticker available in these cases tho.
Summary
avaoid the query for finished events for perf reasons
init discussion on admin discord: https://discord.com/channels/321003439431745537/382120794718732288/1458555076728848597
How did you test this change?
dev