Commit Graph

5 Commits

Author SHA1 Message Date
Bastian Wagner
7c9e19ba0b errors 2026-08-15 20:31:57 +02:00
Bastian Wagner
990a55af14 fix: address final review findings for sync-scheduler-web plan
Close the leaked httpx.AsyncClient in MyWhoosh sync runs, ensure hard
failures finish sync_runs as FAILED instead of leaving them stuck at
RUNNING, log (non-benign) exceptions surfaced by sync_all_enabled during
scheduled ticks, classify GarminImportRejected as a non-retryable
per-activity failure, fix a bug where a live Garmin-class action_required
state could be silently cleared by a run that did no Garmin work, use the
activity's DB primary key instead of the unsanitized remote id for
filesystem paths, add regression/coverage tests for the health-state fix
and MFA code threading through the real SyncManager, add idempotency
coverage to the two-user acceptance test, and note the Dockerfile's
single-process assumption.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 17:09:55 +02:00
Bastian Wagner
6657124983 feat: handle Garmin MFA and activity retries 2026-08-15 16:33:16 +02:00
Bastian Wagner
1d414d6298 feat: isolate concurrent user syncs
Wrap SyncManager.sync_user in a per-user asyncio.Lock (raising
SyncAlreadyRunning on overlap) and add sync_all_enabled() to fan out
across all enabled users with per-user failure isolation via
asyncio.gather(return_exceptions=True). The prior sync_user body is
renamed to _sync_user_locked with no logic changes.
2026-08-15 16:08:00 +02:00
Bastian Wagner
c4e986e3f8 feat: add resumable per-user sync pipeline 2026-08-15 15:53:27 +02:00