fairfield-programming / backend-server

📠 The backend of the Fairfield Programming Association website.
https://fairfieldprogramming.org/
MIT License
26 stars 13 forks source link

Database Cleanup System #109

Closed MassiGy closed 2 years ago

MassiGy commented 2 years ago

Idea

Since, we've created the email verification system, and it appears to be working, we need to create a system that will delete all the user records in our database with the email_confirmed attribute set to false for the past 30 days or so !

Basically, we need to get rid of the user's accounts that did not confirmed their email addresses a while ago , because they are considered inactive.

Why should we implement this system

Let me know your thoughts guys, and feel free to suggest and discuss down below !

Hope that is clear ! Massiles.

Todo

William-McGonagle commented 2 years ago

I think this sounds like a great idea- I like the idea of using the setInterval API, do you think that would lead to too much slowdown of the server?

MassiGy commented 2 years ago

Yeah I was worrying about that, but it wont !

Let me explain why :

That are my current thoughts on the subject. let me know what you think

Thanks in advance ! Massiles.

William-McGonagle commented 2 years ago

Hey @MassiGy-

This sounds great- I can't wait to see what you come up with!

Thanks, William McGonagle

MassiGy commented 2 years ago

Hey @William-McGonagle,

Thanks for the feedback, and your thoughts on this one !

I will eventually start coding this system, in the up coming days.

Thanks again ! Massiles.

ghost commented 2 years ago

Using setInterval for something like this is a terrible idea. If the process is restarted, all intervals will be cleared.

MassiGy commented 2 years ago

Hey @supernova350,

Thanks for contributing on this, I really appreciate it.

Yeah, your point of view is totally right, and I saw that you've suggested to use an npm package for the scheduling part of the system. I think that it will be a very good idea.

Please feel free to suggest your idea, or directly by code.

Thanks again. Massiles.

MassiGy commented 2 years ago

hey @William-McGonagle,

I think after merging my PR, you can close this one.

Massiles.