feat(api): add per-task sse throttling and batching for robust updates
This commit is contained in:
@@ -52,6 +52,7 @@ DEFAULT_MAIN_CONFIG = {
|
||||
"watch": {},
|
||||
"realTimeMultiplier": 0,
|
||||
"padNumberWidth": 3,
|
||||
"sseUpdateIntervalSeconds": 1, # Configurable SSE update interval (default: 1s)
|
||||
}
|
||||
|
||||
|
||||
@@ -188,7 +189,7 @@ task_annotations = {
|
||||
"rate_limit": f"{MAX_CONCURRENT_DL}/m",
|
||||
},
|
||||
"routes.utils.celery_tasks.trigger_sse_update_task": {
|
||||
"rate_limit": "500/m", # Allow high rate for real-time SSE updates
|
||||
"rate_limit": "60/m", # Throttle to 1 update/sec per task (matches SSE throttle)
|
||||
"default_retry_delay": 1, # Quick retry for SSE updates
|
||||
"max_retries": 1, # Limited retries for best-effort delivery
|
||||
"ignore_result": True, # Don't store results for SSE tasks
|
||||
|
||||
Reference in New Issue
Block a user