codeforboston / cambridge_energy_app

EnerSave is designed to help and encourage Cambridge residents to reduce their electric bills.
https://www.enersaveapp.org/
MIT License
33 stars 25 forks source link

Add task to destroy guest users after one week #338

Open CJStadler opened 7 years ago

CJStadler commented 7 years ago

Issue #256.

This destroys users that were created more than one week ago. Is there a way to determine if a user has been inactive, so that we are not destroying active guest users? Is there any reason an active user would remain a guest?

I believe this will not destroy units associated with guest users. Is that the correct behavior?

I can write a spec for the task if necessary.

This does not add any method of scheduling the task. The issue mentioned sidekiq, but that seems like overkill just to run a single job per week. The best option probably depends mostly on how this is being hosted.