Skip to content

fix(sportySync): self-healing 7-day lookback + manual backfill via daysBack#265

Merged
ChristopherRotnes merged 2 commits into
masterfrom
claude/session-editing-uYMWO
May 27, 2026
Merged

fix(sportySync): self-healing 7-day lookback + manual backfill via daysBack#265
ChristopherRotnes merged 2 commits into
masterfrom
claude/session-editing-uYMWO

Conversation

@ChristopherRotnes
Copy link
Copy Markdown
Owner

Summary

  • Timer now looks back 7 days on every run (04:00, 11:00, 14:00 UTC), so a temporary sporty.no outage or Azure Function downtime self-heals on the next sync without losing past gym_calendar rows
  • HTTP trigger accepts daysBack (max 90) for one-time backfills — e.g. POST /api/sporty-sync with {"daysBack": 30} fetches the last 30 days of real sporty.no data and upserts into gym_calendar

Test plan

  • Trigger POST /api/sporty-sync with {"daysBack": 14} and confirm rows for the past 14 days appear in gym_calendar
  • Confirm the gym class selector now shows the previously missing class when editing the affected session
  • Confirm daysBack > 90 is capped at 90 (no unbounded fetches)
  • Confirm existing shiftDays behaviour is unchanged

https://claude.ai/code/session_0111NWsDAWTTZsne2q5JNhJ1


Generated by Claude Code

claude added 2 commits May 27, 2026 19:57
…nual backfill

The timer sync only fetched yesterday→+10 days, so any outage permanently
lost past gym_calendar rows. The timer now always looks back 7 days so
transient failures self-heal on the next run.

The HTTP trigger also accepts {"daysBack": N} (max 90) to allow one-time
backfills of historical data from sporty.no.

https://claude.ai/code/session_0111NWsDAWTTZsne2q5JNhJ1
@ChristopherRotnes ChristopherRotnes marked this pull request as ready for review May 27, 2026 20:00
@ChristopherRotnes ChristopherRotnes merged commit 8c5a942 into master May 27, 2026
1 of 2 checks passed
@ChristopherRotnes ChristopherRotnes deleted the claude/session-editing-uYMWO branch May 27, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants