-
Notifications
You must be signed in to change notification settings - Fork 54
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
Inactive user detection and email notification #865
Conversation
@mininao WDYT of the approach?
|
524e1cf
to
9284293
Compare
af2a2a5
to
1356228
Compare
I'll probably wait for #895 then rebase and use the latest layout. |
Je vois que tu utilises refused_at. |
@carsso Très juste oui. J'ai modifié le code pour prendre en compte les refus explicites et implicites ( |
Pour moi refus explicite c'est pas un inactif. |
Pas de soucis, c'est changé. Je pense que c'est débattable ceci dit... S'il avait été question de cibler les utilisatrices qui n'ont "pas l'air intéressées", plutôt que les utilisateurs inactifs, ça aurait pu avoir du sens de considérer un refus. En tout cas, je n'ai pas vraiment d'avis, je suis très content de suivre les directives que l'on me donne et d'itérer. |
Merci. |
After @navidemad update on email (thank you 🙏): |
2e0764f
to
59b41d2
Compare
Supprimer mon compte | ||
</mj-button> | ||
<mj-text> | ||
<strong>Si le lien ne fonctionne pas</strong>, copiez et collez l’adresse suivante dans votre navigateur : | ||
<br /> | ||
<%= edit_matches_users_url(match_confirmation_token: @match_confirmation_token) %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I replaced this in order to remove the nested controllers in Match
and SlotAlert
controllers.
e8fa548
to
7f7984c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fantastic to me 🤩
7f7984c
to
0f398b3
Compare
Something is wrong with the coverage reports. The tests are passing though 🤷 |
Il faut que je check les tests en local et que je merge. |
0f398b3
to
6177b33
Compare
Summary
This PR introduces an email to invite users to delete their account when they are inactive [1]. It also introduce the query that detect inactive users.
[1] Inactivity is parameterized as described in #829.
Details
Build an SQL query, parameterized with:
refusedunanswered (expired, not confirmed, nor refused) matchesusers.age
(open) rangeusers.created_at
(open) rangeThis query returns users' IDs and is separate from the jobs that enqueue the emails. The goal of having a separate API is to create an interactive
rake
command that does preview the number of emails before actually sending them.Understand the performance implication of loading all users IDs in memoryUnderstand how many emails we're talking aboutI tried to simulate this with a rake task generating data in the development db and tested manually.
TODO:
users.last_inactive_email_sent_at