Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notification cooldown appears to not be enforced #88

Closed
GRarer opened this issue Mar 17, 2021 · 1 comment · Fixed by #90
Closed

notification cooldown appears to not be enforced #88

GRarer opened this issue Mar 17, 2021 · 1 comment · Fixed by #90
Assignees
Labels
bug Something isn't working

Comments

@GRarer
Copy link
Owner

GRarer commented Mar 17, 2021

Now that we've deployed the service and I've been using on my phone for about a day, I've noticed that I seem to be getting Boop reminders more than once in a 4-hour period, which isn't supposed to happen.

@GRarer GRarer added the bug Something isn't working label Mar 17, 2021
@GRarer GRarer self-assigned this Mar 17, 2021
@GRarer
Copy link
Owner Author

GRarer commented Mar 17, 2021

in retrospect it's pretty clear why this bug happens. here's CTE where we match selected users with the array of friends who we could pair them with:

friend_options AS (
        SELECT user_a, array_agg(user_b order by random()) as user_bs
        FROM friends_chosen_users join friends on friends_chosen_users.user_uuid = friends.user_a
        group by user_a
    ),

friends_chosen_users won't include anybody who got a notification in the last 4 hours, but we don't guarantee that the second user isn't still cooling down.

fixing this should be easy to implement, but a bit tricky to difficult to test and deploy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant