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:
@@ -1000,6 +1000,53 @@ async def cancel_line_render(
|
||||
}
|
||||
|
||||
|
||||
class RejectLineBody(BaseModel):
|
||||
reason: str = ""
|
||||
|
||||
|
||||
@router.post("/{order_id}/lines/{line_id}/reject", status_code=200)
|
||||
async def reject_order_line(
|
||||
order_id: uuid.UUID,
|
||||
line_id: uuid.UUID,
|
||||
body: RejectLineBody,
|
||||
user: User = Depends(get_current_user),
|
||||
db: AsyncSession = Depends(get_db),
|
||||
):
|
||||
"""Reject a single order line (admin/PM only).
|
||||
|
||||
Sets item_status to 'rejected' and stores the reason in the notes field.
|
||||
"""
|
||||
if not _is_privileged(user):
|
||||
raise HTTPException(status_code=403, detail="Insufficient permissions")
|
||||
|
||||
result = await db.execute(select(Order).where(Order.id == order_id))
|
||||
order = result.scalar_one_or_none()
|
||||
if not order:
|
||||
raise HTTPException(404, detail="Order not found")
|
||||
|
||||
line_result = await db.execute(
|
||||
select(OrderLine).where(OrderLine.id == line_id, OrderLine.order_id == order_id)
|
||||
)
|
||||
line = line_result.scalar_one_or_none()
|
||||
if not line:
|
||||
raise HTTPException(404, detail="Order line not found")
|
||||
|
||||
from sqlalchemy import update as sql_update
|
||||
|
||||
notes_value = body.reason.strip() if body.reason and body.reason.strip() else line.notes
|
||||
await db.execute(
|
||||
sql_update(OrderLine)
|
||||
.where(OrderLine.id == line.id)
|
||||
.values(
|
||||
item_status="rejected",
|
||||
notes=notes_value,
|
||||
)
|
||||
)
|
||||
await db.commit()
|
||||
|
||||
return {"rejected": True, "line_id": str(line.id), "reason": body.reason}
|
||||
|
||||
|
||||
@router.post("/{order_id}/cancel-renders")
|
||||
async def cancel_order_renders(
|
||||
order_id: uuid.UUID,
|
||||
|
||||
Reference in New Issue
Block a user