chore: snapshot workflow migration progress

This commit is contained in:
2026-04-12 11:49:04 +02:00
parent 0cd02513d5
commit 3e810c74a3
163 changed files with 31774 additions and 2753 deletions
+15 -1
View File
@@ -8,6 +8,7 @@ import subprocess
import uuid
from pathlib import Path
from app.domains.materials.library_paths import resolve_asset_library_blend_path
from app.tasks.celery_app import celery_app
logger = logging.getLogger(__name__)
@@ -43,7 +44,20 @@ def refresh_asset_library_catalog(self, asset_library_id: str) -> None:
if not lib:
logger.warning("AssetLibrary %s not found", asset_library_id)
return
blend_path = lib.blend_file_path
resolved_path = resolve_asset_library_blend_path(
blend_file_path=lib.blend_file_path,
asset_library_id=lib.id,
)
if resolved_path and resolved_path != lib.blend_file_path:
logger.warning(
"AssetLibrary %s path repaired from %s to %s before catalog refresh",
asset_library_id,
lib.blend_file_path,
resolved_path,
)
lib.blend_file_path = resolved_path
db.commit()
blend_path = resolved_path or lib.blend_file_path
engine.dispose()
if not blend_path or not Path(blend_path).exists():