Closed DrewTCurrie closed 1 week ago
Need to pull dev back into this and edit it to remove old audio files and set all messages/audio back to default. Waiting on resolution of #46
The timing of some of the commits also seems to be off from when I was testing the garbage collector running automatically on 10/31/2024. This shouldn't cause an issue but it does mess with the git history. Thought I had this fixed but I guess not.
Tested with audio changes. This works, but does not set everything back to default.
Created a garbage collector to clear out old reports, badges, and profile pictures. This required a rewrite of the background task scheduler that previously existed for automatic report generation. This is because the new system would use different pathing to access the files to be removed and to handle multiple threads.
Once the background scheduler is called, it checks if today is the last day of the week or the last day of the month and then decides what to do. Previously it was hardcoded that if it was the last day of the week to only generate a weekly report and similarly for the monthly reports.
Scheduler checks:
In the backgroundScheduler.py file new tasks can be easily added to run on a weekly or monthly basis:
Adding new functions to the monthly or weekly tasks list will cause those tasks to be executed at 9:00PM local time on the respective trigger date.
This is fully integrated in with the automatic mailing of the reports and closes out:
19 #20 & #34