mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-13 11:22:14 +02:00
fix: increase concurrency limit an handle it across all call paths (#508)
* fix: increase concurrency limit an handle it across all call paths * fix: fix review comments and test * fix: address concurrency review findings (campaign-scoped counter, cleanup hardening, webrtc run validation) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat: emit usage_concurrent_call_limit_reached PostHog event Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix: align usage event with MPS org-event convention (per-member fan-out) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat: cap max_call_duration at 20 min via typed workflow_configurations request Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
f3bcf24370
commit
041c31a613
40 changed files with 2369 additions and 467 deletions
|
|
@ -393,8 +393,10 @@ export const useWebSocketRTC = ({ workflowId, workflowRunId, accessToken, initia
|
|||
// Stop the connection and surface the handled service error.
|
||||
cleanupConnection({ graceful: false, status: 'failed' });
|
||||
} else {
|
||||
// Log other errors as actual errors
|
||||
const serverErrorMessage = message.payload?.message || 'Server error';
|
||||
logger.error('Server error:', message.payload);
|
||||
setPermissionError(serverErrorMessage);
|
||||
cleanupConnection({ graceful: false, status: 'failed' });
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -606,7 +608,7 @@ export const useWebSocketRTC = ({ workflowId, workflowRunId, accessToken, initia
|
|||
}
|
||||
};
|
||||
});
|
||||
}, [getWebSocketUrl, cleanupConnection]);
|
||||
}, [getWebSocketUrl, cleanupConnection, setPermissionError]);
|
||||
|
||||
const negotiate = async () => {
|
||||
const pc = pcRef.current;
|
||||
|
|
@ -661,6 +663,7 @@ export const useWebSocketRTC = ({ workflowId, workflowRunId, accessToken, initia
|
|||
setIsStarting(true);
|
||||
setConnectionActive(false);
|
||||
setIsCompleted(false);
|
||||
setPermissionError(null);
|
||||
setConnectionStatus('connecting');
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue