DoSomething / gladiator

:guardsman: The DoSomething.org competitions platform.
2 stars 0 forks source link

only show top 100 in email #419

Closed sbsmith86 closed 4 years ago

sbsmith86 commented 7 years ago

What's this PR do?

Slices the leaderboard to the top 100 folks before rendering it in the email.

How should this be manually tested?

Send a leaderboard and you should only see the top 100 in the email.

Any background context you want to provide?

I originally thought this would help with some performances bottlenecks that happen when trying to grab large amount of RB data for a large set of users. But that was stupid because we still need all the user activity to calculate who is in the top 100

image

Regardless, it does seem really heavy to put the full leaderboard, that is sometimes over 1k people, in one email, so I think chopping it makes sense for the user experience anyway.

What are the relevant tickets?

Addresses https://www.pivotaltracker.com/story/show/149209601

DFurnes commented 4 years ago

2017, vintage! Closing this out so I don’t keep getting GitHub reminders to review it.

(Hi Shae!!! 👋)