feat(phase8.1-8.2): dynamic worker concurrency via worker_configs
- Migration 054: worker_configs table (queue_name PK, max/min_concurrency,
enabled, updated_at); seeds step_processing(8/2), thumbnail_rendering(1/1),
ai_validation(4/1)
- WorkerConfig SQLAlchemy model
- apply_worker_concurrency beat task: reads enabled configs, broadcasts
pool_grow to all Celery workers every 5min
- GET/PUT /api/worker/configs (admin): list + update per-queue concurrency
- docker-compose.yml: worker uses --autoscale=${MAX_CONCURRENCY:-8},${MIN_CONCURRENCY:-2};
render-worker uses --autoscale=1,1 --concurrency=1
- WorkerManagement.tsx: "Concurrency Settings" section with +/- steppers
and Save button per queue
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,5 +46,9 @@ celery_app.conf.update(
|
||||
"task": "app.tasks.beat_tasks.recover_stalled_renders",
|
||||
"schedule": 300.0, # every 5 minutes
|
||||
},
|
||||
"apply-worker-concurrency-every-5m": {
|
||||
"task": "app.tasks.beat_tasks.apply_worker_concurrency",
|
||||
"schedule": 300.0, # every 5 minutes
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user