fly-apps / live_beats

MIT License
1.28k stars 163 forks source link

Autoexpire songs #23

Closed bemesa21 closed 2 years ago

bemesa21 commented 2 years ago

A GenServer is used to remove songs when the expiration period has passed based on the song creation date. The expiration period can be configured when the GenServer is started in the application supervision tree, the Genserver receives two arguments: count and interval. For example, you can choose to have songs expire two months after their creation date by passing the count=2 and interval="month" arguments

bemesa21 commented 2 years ago

Changes are ready! I created a new test to validate the song count after deleting expired songs. I also removed some duplicate code and reused some functions.

chrismccord commented 2 years ago

❤️❤️❤️🐥🔥