Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strava Checkout importer needs to set strava-last-activity-date.json #128

Closed
biker793 opened this issue Jul 29, 2024 · 5 comments
Closed
Labels
component: Strava Everything related to Strava type: bug Something isn't working

Comments

@biker793
Copy link

biker793 commented Jul 29, 2024

After updating to Version 0.24.0 the program tries to fetch new activities even though there are no new activities on strava. It tries until the API rate limit is reached.
After going back to 0.23.0 the acces to the Strava API works.

2024-07-29 19:17:21 geo_activity_playground.core.cache_migrations INFO Apply cache migration if needed …
2024-07-29 19:17:21 geo_activity_playground.core.cache_migrations INFO Applying cache migration add_consider_for_achievements …
2024-07-29 19:17:21 geo_activity_playground.core.cache_migrations INFO Applying cache migration delete_tile_visits …
2024-07-29 19:17:21 geo_activity_playground.core.cache_migrations INFO Applying cache migration delete_heatmap_cache …
2024-07-29 19:17:22 geo_activity_playground.core.cache_migrations INFO Applying cache migration delete_tile_visits …
2024-07-29 19:17:22 geo_activity_playground.core.cache_migrations INFO Applying cache migration delete_everything …
Parse activity metadata: 100%|█████████████████████████████████████████████████████████████| 1022/1022 [01:07<00:00, 15.13it/s]
Collate activity metadata: 100%|███████████████████████████████████████████████████████████| 1022/1022 [00:17<00:00, 58.13it/s]
Downloading Strava activities: 39it [00:24,  1.73it/s]2024-07-29 19:19:12 stravalib.util.limiter.SleepingRateLimitRule WARNING Short term API rate limit exceeded
@martin-ueding martin-ueding added type: bug Something isn't working status: information needed Further information is requested component: Strava Everything related to Strava labels Jul 29, 2024
@martin-ueding
Copy link
Owner

I've just tried it with a new Strava account that I've set up, it stops after the last activity. But I've done a bunch of changes to the code now, so I might have accidentally fixed it.

Could you please test with 0.25.0 and see whether it is better?

@biker793
Copy link
Author

biker793 commented Aug 7, 2024

I just tested it with 0.26.2. It is still not working. Might be the same issue as #140

@biker793
Copy link
Author

biker793 commented Aug 8, 2024

Do you think it is possible to tell the API to only import activities aftter a certain date (e.g. date of strava bulk export)?

@martin-ueding
Copy link
Owner

Before version 0.24 the logic was that the Strava API would be queried for activities that are later than the latest activity that was registered from any source. When I changed it into a two-step process, the Strava API importer keeps track of the latest activity that it has gotten. But the Strava Checkout Importer does not set this field and therefore the Strava API isn't aware. It will still download the detailed metadata and perhaps also the time series, burning one or two API calls per activity.

I just need to let the bulk importer write into that one file that the Strava API Importer looks at. Then the Strava API Importer can continue from after the latest Strava activity (be that from the Checkout Importer or API Importer).

@martin-ueding martin-ueding removed the status: information needed Further information is requested label Aug 9, 2024
@martin-ueding martin-ueding changed the title Strava API stuck after update to 0.24.0 Strava Checkout importer needs to set strava-last-activity-date.json Aug 9, 2024
@martin-ueding
Copy link
Owner

I now write the necessary file. This should be fixed in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Strava Everything related to Strava type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants