refactor: rename thumbnail_rendering queue to asset_pipeline

The queue handles far more than thumbnails: OCC tessellation, USD master
generation, GLB production, order line renders, and workflow renders.
asset_pipeline better reflects its role as the render-worker's primary queue.

Updated all references in: task decorators, celery_app.py, beat_tasks.py,
docker-compose.yml worker command, worker.py MONITORED_QUEUES, admin.py,
CLAUDE.md, LEARNINGS.md, Dockerfile, helpTexts.ts, test files,
and all .claude/commands/*.md skill files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 22:28:38 +01:00
parent e7b70a35ea
commit 1321ef2bd4
39 changed files with 540 additions and 122 deletions
+7 -1
View File
@@ -79,7 +79,7 @@ def match_cad_to_items(
return matched
def extract_cad_metadata(cad_file_id: str) -> None:
def extract_cad_metadata(cad_file_id: str, tenant_id: str | None = None) -> None:
"""
Fast metadata extraction for a CAD file (no thumbnail generation).
@@ -94,9 +94,11 @@ def extract_cad_metadata(cad_file_id: str) -> None:
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from app.models.cad_file import CadFile, ProcessingStatus
from app.core.tenant_context import set_tenant_context_sync
engine = create_engine(settings.database_url_sync)
with Session(engine) as session:
set_tenant_context_sync(session, tenant_id)
cad_file = session.get(CadFile, uuid.UUID(cad_file_id))
if not cad_file:
logger.error(f"CAD file not found: {cad_file_id}")
@@ -452,6 +454,7 @@ def _get_all_settings() -> dict[str, str]:
"thumbnail_format": "jpg",
"blender_smooth_angle": "30",
"cycles_device": "auto",
"tessellation_engine": "occ",
}
try:
from app.config import settings as app_settings
@@ -533,6 +536,7 @@ def _generate_thumbnail(
samples=samples,
smooth_angle=int(settings["blender_smooth_angle"]),
cycles_device=settings["cycles_device"],
tessellation_engine=settings["tessellation_engine"],
)
rendered_png = tmp_png if tmp_png.exists() else None
except Exception as exc:
@@ -642,6 +646,7 @@ def render_to_file(
denoising_use_gpu: str = "",
order_line_id: str | None = None,
usd_path: "Path | None" = None,
tessellation_engine: str | None = None,
) -> tuple[bool, dict]:
"""Render a STEP file to a specific output path using current system settings.
@@ -777,6 +782,7 @@ def render_to_file(
denoising_use_gpu=denoising_use_gpu,
log_callback=_log_cb,
usd_path=usd_path,
tessellation_engine=tessellation_engine or settings["tessellation_engine"],
)
rendered_png = tmp_png if tmp_png.exists() else None
except Exception as exc: