Skip to content

fix(meshcore): post channel sync to STORAGE_API_2#109

Merged
pskillen merged 1 commit into
mainfrom
fix/paddy/mc-channel-sync-api-2
May 21, 2026
Merged

fix(meshcore): post channel sync to STORAGE_API_2#109
pskillen merged 1 commit into
mainfrom
fix/paddy/mc-channel-sync-api-2

Conversation

@pskillen

Copy link
Copy Markdown
Owner

Summary

  • On connect (and after WS apply), read the MeshCore device channel table once and POST the same snapshot to every entry in bot.storage_apis (primary + STORAGE_API_2_ROOT).
  • STORAGE_API_2_TOKEN now falls back to STORAGE_API_TOKEN when unset (common dual-API dev setup).
  • MeshCore API 2 wrapper uses api_version=2 like the primary (feeder-scoped paths).
  • Startup and per-destination logs show which API URLs receive channel sync (and HTTP errors include base_url).

Test plan

  • pytest test/meshcore/test_channel_sync.py test/meshcore/test_radio_channel_sync.py test/test_bot.py
  • Restart bot with STORAGE_API_2_ROOT + MESHCORE_UPLOAD_ENABLED=true; confirm log lines API upload destinations (2): … and MeshCore channel sync posted to <api2-url>
  • Verify mc_channels_synced_at / device mirror on API 2 Django admin for the feeder

Read device channels once and POST the same snapshot to primary and
STORAGE_API_2. Fall back STORAGE_API_2_TOKEN to STORAGE_API_TOKEN; use
api_version=2 for MeshCore API 2. Log each destination on connect/sync.
@pskillen pskillen merged commit 3e0b6cb into main May 21, 2026
3 checks passed
@pskillen pskillen deleted the fix/paddy/mc-channel-sync-api-2 branch May 21, 2026 16:10
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