Repository navigation
feat(admin): MQTT re-sync and clear & re-sync on the database page - #321
Merged
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an MQTT card to Manage Instance → Database with two buttons:
While a run is in progress, whether this user started it or someone else did, both buttons are disabled. The page shows its progress (polled every 2s) and reports when it finishes or fails. A 409 is reported as "already running". If the status can't be read (no permission, or an older PlaceOS), the status line is hidden.
It calls
POST/GET /api/engine/v2/source/resync(PlaceOS/rest-api#454, system admin only), which uses source's clear-and-resync (PlaceOS/source#67). At 3,000 systems a clear and re-sync took 37s.Draft until ts-client 6.11.0 is published
This needs
sourceResync/sourceResyncStatusfrom PlaceOS/ts-client#33, which isn't released yet. That will be 6.11.0, since 6.10.0 is the reindex/backfill removal. Once it's published,@placeos/ts-clientgets bumped here.Testing
database-details.component.spec.ts(6 tests, real template):clear=trueand reports a failure;nx build backofficepasses. These ran against a local build of ts-client#33.🤖 Generated with Claude Code