Uh oh!
There was an error while loading. Please reload this page.
[PAY-3814] Endless Listen Streak Challenge - #11178
Conversation
|
There was a problem hiding this comment.
I don't think generate_specifier needs to go to the DB actually?
There's several possible outcomes:
- This is day 1 of the 7 days, and we need to create a new challenge
- Use today's date,
should_create_challengeisTrue
- Use today's date,
- This is day 2-7, and we need to update the existing challenge
- Can use anything for the specifier, as
should_create_challengeisFalseand instead we will update the existing challenge inupdate_user_challenges
- Can use anything for the specifier, as
- This is day 8+, and we need to create a new challenge for the endless streak
- Use today's date,
should_create_challengeisTrue
- Use today's date,
Is there someplace where we need the existing challenge's specifier?
EDIT: yes, it's in challenge manager before calling update challenge on the updater
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
faa1592 to
3238b90Compareisaacsolo
commented
Jan 29, 2025
looking gooooood |
raymondjacobson
left a comment
There was a problem hiding this comment.
lgtm looks like you've got a test failure though
Description
user_challengelisten streak rows per user (formerly only 1 per user).generate_specifierto determine whether to use the existinguser_challengerow, or create a new one. But this is the only challenge that will have this query.ChallengeListenStreakrow per user - another db query to determine whether one exists or not inon_after_challenge_creation.user_challengerows without specifiers for testsHow Has This Been Tested?
Integration tests pass