perf: dual queue, GLB caching, WebP output, persistent BVH
Task 4: Dual render queue - render-worker: heavy (asset_pipeline, concurrency=1) — HQ 2048x2048, animations - render-worker-light: light (asset_pipeline_light, concurrency=2) — thumbnails, <=1024 - Thumbnails routed to light queue automatically - Order line renders routed by resolution at dispatch time Task 5: GLB caching (skip re-tessellation) - Before tessellating, check if gltf_geometry MediaAsset exists for the cad_file_id - If found, copy to expected path — render_blender.py finds it and skips tessellation - Saves 7-11s per re-render of the same product Task 6: WebP output format - New 'webp' option in output_format (OutputType admin) - Blender renders PNG intermediate, Pillow converts to WebP (quality=90, method=4) - 50-70% smaller files with no visible quality loss - Correct MIME type (image/webp) in MediaAsset Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -72,7 +72,7 @@ def _pipeline_session(tenant_id: str | None = None):
|
||||
engine.dispose()
|
||||
|
||||
|
||||
@celery_app.task(bind=True, name="app.tasks.step_tasks.render_step_thumbnail", queue="asset_pipeline")
|
||||
@celery_app.task(bind=True, name="app.tasks.step_tasks.render_step_thumbnail", queue="asset_pipeline_light")
|
||||
def render_step_thumbnail(self, cad_file_id: str):
|
||||
"""Render the thumbnail for a freshly-processed STEP file.
|
||||
|
||||
@@ -188,7 +188,7 @@ def render_step_thumbnail(self, cad_file_id: str):
|
||||
pl.step_done("render_step_thumbnail")
|
||||
|
||||
|
||||
@celery_app.task(bind=True, name="app.tasks.step_tasks.regenerate_thumbnail", queue="asset_pipeline")
|
||||
@celery_app.task(bind=True, name="app.tasks.step_tasks.regenerate_thumbnail", queue="asset_pipeline_light")
|
||||
def regenerate_thumbnail(self, cad_file_id: str, part_colors: dict):
|
||||
"""Regenerate thumbnail with per-part colours."""
|
||||
pl = PipelineLogger(task_id=self.request.id)
|
||||
|
||||
Reference in New Issue
Block a user