a18d4c23ec
- feat(migration): 045_asset_libraries — new asset_libraries table (blend_file_path, catalog JSONB) - feat(model): AssetLibrary SQLAlchemy model in domains/materials/models.py - feat(api): POST/GET/PATCH/DELETE /api/asset-libraries + /upload-blend + /refresh-catalog endpoints - feat(celery): refresh_asset_library_catalog task on thumbnail_rendering queue — runs Blender headless - feat(blender): catalog_assets.py — extracts asset-marked materials + node_groups from .blend - feat(blender): asset_library.py — apply_asset_library_materials + apply_asset_library_node_groups helpers - feat(blender): export_gltf.py — STEP→STL→GLB production export with optional asset library - feat(blender): export_blend.py — STEP→STL→.blend production export with pack_all() - feat(frontend): api/assetLibraries.ts — full CRUD API client - feat(frontend): AssetLibraryPanel in Admin.tsx — upload, refresh, expand catalog view - docs: Blender asset_data marking requirement learning in LEARNINGS.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
from celery import Celery
|
|
from celery.schedules import crontab
|
|
from app.config import settings
|
|
|
|
celery_app = Celery(
|
|
"schaefflerautomat",
|
|
broker=settings.redis_url,
|
|
backend=settings.redis_url,
|
|
include=[
|
|
"app.tasks.step_tasks",
|
|
"app.tasks.ai_tasks",
|
|
"app.tasks.beat_tasks",
|
|
"app.domains.rendering.tasks",
|
|
"app.domains.products.tasks",
|
|
"app.domains.imports.tasks",
|
|
"app.domains.materials.tasks",
|
|
],
|
|
)
|
|
|
|
celery_app.conf.update(
|
|
task_serializer="json",
|
|
result_serializer="json",
|
|
accept_content=["json"],
|
|
timezone="UTC",
|
|
enable_utc=True,
|
|
task_routes={
|
|
"app.tasks.step_tasks.*": {"queue": "step_processing"},
|
|
"app.tasks.ai_tasks.*": {"queue": "ai_validation"},
|
|
"app.tasks.beat_tasks.*": {"queue": "step_processing"},
|
|
"app.domains.rendering.tasks.*": {"queue": "thumbnail_rendering"},
|
|
},
|
|
beat_schedule={
|
|
"broadcast-queue-status-every-10s": {
|
|
"task": "app.tasks.beat_tasks.broadcast_queue_status",
|
|
"schedule": 10.0, # every 10 seconds
|
|
},
|
|
},
|
|
)
|