mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2025-12-16 07:25:48 -07:00
Removed Legacy Assembly JSON Files
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
# - POST /api/assemblies/<assembly_guid>/clone (Token Authenticated (Admin+Dev Mode for non-user domains)) - Clones an assembly into a target domain.
|
||||
# - POST /api/assemblies/dev-mode/switch (Token Authenticated (Admin)) - Enables or disables Dev Mode overrides for the current session.
|
||||
# - POST /api/assemblies/dev-mode/write (Token Authenticated (Admin+Dev Mode)) - Flushes queued assembly writes immediately.
|
||||
# - POST /api/assemblies/official/sync (Token Authenticated (Admin+Dev Mode)) - Rebuilds the official domain from staged JSON assemblies.
|
||||
# - POST /api/assemblies/import (Token Authenticated (Domain write permissions)) - Imports a legacy assembly JSON document into the selected domain.
|
||||
# - GET /api/assemblies/<assembly_guid>/export (Token Authenticated) - Exports an assembly as legacy JSON with metadata.
|
||||
# ======================================================
|
||||
@@ -552,21 +551,4 @@ def register_assemblies(app, adapters: "EngineServiceAdapters") -> None:
|
||||
service._audit(user=user, action="flush_queue", status="error", detail="internal server error")
|
||||
return jsonify({"error": "internal server error"}), 500
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Official sync
|
||||
# ------------------------------------------------------------------
|
||||
@blueprint.route("/official/sync", methods=["POST"])
|
||||
def sync_official():
|
||||
user, error = service.require_admin(dev_mode_required=True)
|
||||
if error:
|
||||
return jsonify(error[0]), error[1]
|
||||
try:
|
||||
service.runtime.sync_official()
|
||||
service._audit(user=user, action="sync_official", status="success")
|
||||
return jsonify({"status": "synced"}), 200
|
||||
except Exception: # pragma: no cover
|
||||
service.logger.exception("Official assembly sync failed.")
|
||||
service._audit(user=user, action="sync_official", status="error", detail="internal server error")
|
||||
return jsonify({"error": "internal server error"}), 500
|
||||
|
||||
app.register_blueprint(blueprint)
|
||||
|
||||
@@ -19,7 +19,6 @@ from typing import Any, Dict, List, Mapping, Optional, Union
|
||||
|
||||
from ...assembly_management.bootstrap import AssemblyCache
|
||||
from ...assembly_management.models import AssemblyDomain, AssemblyRecord, CachedAssembly, PayloadType
|
||||
from ...assembly_management.sync import sync_official_domain
|
||||
from .serialization import (
|
||||
AssemblySerializationError,
|
||||
MAX_DOCUMENT_BYTES,
|
||||
@@ -168,13 +167,6 @@ class AssemblyRuntimeService:
|
||||
def flush_writes(self) -> None:
|
||||
self._cache.flush_now()
|
||||
|
||||
def sync_official(self) -> None:
|
||||
db_manager = self._cache.database_manager
|
||||
payload_manager = self._cache.payload_manager
|
||||
staging_root = db_manager.staging_root
|
||||
sync_official_domain(db_manager, payload_manager, staging_root, logger=self._logger)
|
||||
self._cache.reload()
|
||||
|
||||
def import_assembly(
|
||||
self,
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user