fix(K): correct CATALOG_SCRIPT path + register AssetLibrary in models/__init__
- fix(tasks): use RENDER_SCRIPTS_DIR env var for catalog_assets.py path (was computing wrong path via __file__ parents → /render-worker/scripts/ which doesn't exist in container) - fix(models): add AssetLibrary to app/models/__init__.py so alembic autogenerate discovers it - fix(api): remove unused FileResponse import from asset_libraries.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ from __future__ import annotations
|
||||
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import subprocess
|
||||
import uuid
|
||||
from pathlib import Path
|
||||
@@ -11,7 +12,8 @@ from celery import shared_task
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
CATALOG_SCRIPT = Path(__file__).parent.parent.parent.parent.parent / "render-worker" / "scripts" / "catalog_assets.py"
|
||||
# Scripts are copied to /render-scripts/ in the render-worker container (RENDER_SCRIPTS_DIR env var)
|
||||
CATALOG_SCRIPT = Path(os.environ.get("RENDER_SCRIPTS_DIR", "/render-scripts")) / "catalog_assets.py"
|
||||
|
||||
|
||||
@shared_task(
|
||||
@@ -48,7 +50,6 @@ def refresh_asset_library_catalog(self, asset_library_id: str) -> None:
|
||||
return
|
||||
|
||||
# Determine Blender binary
|
||||
import os
|
||||
blender_bin = os.environ.get("BLENDER_BIN", "blender")
|
||||
|
||||
result = subprocess.run(
|
||||
|
||||
Reference in New Issue
Block a user