Add headless Garmin background sync (systemd timer)

New `bincio sync-garmin` command mirrors sync-strava: discovers all users
with garmin_creds.json, refreshes cached garth OAuth2 session, imports new
activities, and optionally POSTs to the rebuild endpoint.

systemd timer fires every 3h offset by 1h30m from Strava to avoid
simultaneous rebuilds. Status written to _garmin_sync_status.json per user.
This commit is contained in:
Davide Scaini
2026-05-16 20:13:12 +02:00
parent 307f1fbbc1
commit 0eb25620ef
4 changed files with 211 additions and 0 deletions
+2
View File
@@ -20,6 +20,7 @@ from bincio.serve.cli import serve # noqa: E402
from bincio.dev import dev # noqa: E402
from bincio.reextract_cmd import reextract_originals # noqa: E402
from bincio.sync_strava import sync_strava_cmd # noqa: E402
from bincio.sync_garmin import sync_garmin_cmd # noqa: E402
from bincio.segments.cli import segments_group # noqa: E402
@@ -49,4 +50,5 @@ main.add_command(serve)
main.add_command(dev)
main.add_command(reextract_originals)
main.add_command(sync_strava_cmd)
main.add_command(sync_garmin_cmd)
main.add_command(segments_group)