feat(J): WebSocket live-events + replace polling + fix ffmpeg turntable timeout
- fix(render): ffmpeg overlay=0:0 -> overlay=0:0:shortest=1 to prevent hang on finite PNG sequences - feat(ws): add core/websocket.py ConnectionManager + Redis Pub/Sub subscriber loop - feat(ws): add /api/ws WebSocket endpoint with JWT query-param auth in main.py - feat(ws): emit render_complete/failed + cad_processing_complete events from step_tasks.py - feat(ws): emit order_status_change events from orders router - feat(ws): add beat_tasks.py broadcast_queue_status task (every 10s via Redis __broadcast__) - feat(frontend): add useWebSocket hook with auto-reconnect (exponential backoff, 25s ping) - feat(frontend): add WebSocketContext + WebSocketProvider wrapping App - refactor(frontend): remove polling from WorkerActivity (was 5s/3s) + OrderDetail (was 5s) - refactor(frontend): reduce polling in Layout (8s->60s) + NotificationCenter (15s->60s) - docs: add ffmpeg shortest=1 + WebSocket JWT auth learnings to LEARNINGS.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from celery import Celery
|
||||
from celery.schedules import crontab
|
||||
from app.config import settings
|
||||
|
||||
celery_app = Celery(
|
||||
@@ -8,6 +9,7 @@ celery_app = Celery(
|
||||
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",
|
||||
@@ -23,7 +25,13 @@ celery_app.conf.update(
|
||||
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={},
|
||||
beat_schedule={
|
||||
"broadcast-queue-status-every-10s": {
|
||||
"task": "app.tasks.beat_tasks.broadcast_queue_status",
|
||||
"schedule": 10.0, # every 10 seconds
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user