aaron-schroeder / distilling-flask

Strava app for display and analysis of personal running data, powered by Flask, Dash, and Pandas.
MIT License
3 stars 0 forks source link

Consider switch from celery to BackgroundScheduler() #78

Closed aaron-schroeder closed 1 year ago

aaron-schroeder commented 1 year ago

I don't think I want celery taking up valuable ram just to support the one-time onloading of data. I would be perfectly fine waiting for the activities to be gradually added, as the server memory and Strava rate limits allow.

I think the cron job approach will be best, periodically checking for more activities and saving a few at a time, writing to a logfile somewhere. I can adjust the time between jobs or the number submitted based on rate limits. Or I could just handle the stravalib error.

The cron job can be done manually or using BackgroundScheduler().

References

aaron-schroeder commented 1 year ago

I ended up getting celery to work beautifully, and it will be the default approach to background tasks going forward.