feature: faceit and premier leaderboard categories - #411
Merged
Merged
Conversation
- get_leaderboard gains faceit_elo and premier_rank, served from the ratings cached on players; an unplaced premier rank of 0 is treated as no rank - neither takes a window, season or source: a cached rating is not a match statistic, and filtering one by last-7-days would empty the board - the faceit poll now tops up the least recently refreshed ratings, bounded and at low concurrency, reusing refreshPlayer's per-player hourly lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two categories to the existing leaderboard: Faceit (rating, with skill level alongside) and Premier (rank). Pairs with 5stackgg/web#TBD.
Both are served by
get_leaderboard, so paging, the aggregate count and jump-to-your-rank all work unchanged — the only new SQL is one helper and two dispatcher branches.Two things they deliberately do differently from every other category:
The FACEIT ratings behind it used to be refreshed only on demand or during an import, so a leaderboard over them would have gone stale. The existing faceit poll now also tops up the least recently refreshed ratings — bounded to a batch, two at a time, and reusing
refreshPlayer's per-player hourly lock, so a busier poll does not mean more calls to an API we do not own.Tests: 944 unit (+5), 1378 SQL (+9).