SamR1 / FitTrackee

Self-hosted outdoor activity tracker :bicyclist:
https://samr1.github.io/FitTrackee
GNU Affero General Public License v3.0
696 stars 43 forks source link

Reprocess older workout weather data #480

Open Dryusdan opened 8 months ago

Dryusdan commented 8 months ago

Hello 👋

First, thank you for this amaizing project, I can now download all of my bike data without any dependent service. Actually, this issue is not an issue but a question.

I fetch and download all of my bike workout from Garmin (I made a little program, may I tall about it later (it's open source but in earlier state)) and I generate too many requests on visualcrossing. My account was "banned" from visualcrossing for overcharge after multiple HTTP code 429, I receive 401. I can "unblock" my account, but all of my acitivies sended haven't weather data.

Is there a way to reprocess all workout without weather data ? :)

Thank by advance :)

SamR1 commented 8 months ago

Hi,

Thanks for your feedback.

For now it is not possible via the API to reprocess workouts to get weather data or recalculate some values like max speed for instance (only few values can be updated).

Maybe one workaround is to add a pause between workouts imports to avoid exceeding Weather API rate limit.

Dryusdan commented 8 months ago

Hum, okay.

Okay, I will add a rate limit for import in case of weather is enable on fittrackee instance. Thank :)

SamR1 commented 8 months ago

is there a lot of workouts to reprocess?

Dryusdan commented 8 months ago

Approximately 1400 ^^ (I forgot to remove my weather key on my dev instance 😅 )

SamR1 commented 8 months ago

yes, for bulk imports via scripts, the other solution is to temporarily remove the key.