Skip to content

feat(root): add sourceResync and sourceResyncStatus - #33

Merged
stakach merged 1 commit into
masterfrom
feat/source-resync
Oct 15, 2026
Merged

stakach merged 1 commit into
masterfrom
feat/source-resync

Conversation

@stakach

@stakach stakach commented Oct 15, 2026

Copy link
Copy Markdown
Member

Client functions for the MQTT resync helpers in PlaceOS/rest-api#454, which are system admin only:

  • sourceResync(clear = false): POST /source/resync?clear=. Publishes every module's state and every model's metadata to the brokers again, after removing everything PlaceOS publishes from them when clear is set. It resolves to the run's status. A run already in progress rejects with the raw 409 Response, like other non-OK statuses.
  • sourceResyncStatus(): GET /source/resync. Reports where the last run got to.
  • New type PlaceSourceResyncStatus.

These are for the backoffice Manage Instance → Database page; that PR follows. This ships as a minor release (feat).

Testing: new test/root/functions.spec.ts (2 tests) passes, and npm run build passes.

🤖 Generated with Claude Code

Start a resync of the MQTT brokers, optionally clearing everything PlaceOS
publishes first, and read where it got to (PlaceOS/rest-api#454). For the
backoffice database page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stakach
stakach merged commit d0b72f3 into master Oct 15, 2026
3 checks passed
@stakach
stakach deleted the feat/source-resync branch October 15, 2026 01:30
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 6.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

stakach added a commit to PlaceOS/backoffice that referenced this pull request Oct 15, 2026
Two buttons on Manage Instance > Database: re-sync publishes every
module's state and every model's metadata to the MQTT brokers again, and
clear & re-sync removes everything PlaceOS published first, after a
confirmation. A running re-sync, whoever started it, disables both and
shows its progress until it finishes or fails.

Needs @placeos/ts-client with sourceResync (PlaceOS/ts-client#33).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant