Skip to content

Commit b97c3b8

Browse files
fix insufficient capacity error text to not suspend orchestrators
1 parent ba70032 commit b97c3b8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

server/ai_http.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (h *lphttp) StartLiveVideoToVideo() http.Handler {
119119

120120
// Check if there is capacity for the request
121121
if !orch.CheckAICapacity(pipeline, modelID) {
122-
respondWithError(w, fmt.Sprintf("Insufficient capacity for pipeline=%v modelID=%v", pipeline, modelID), http.StatusServiceUnavailable)
122+
respondWithError(w, fmt.Sprintf("insufficient capacity for pipeline=%v modelID=%v", pipeline, modelID), http.StatusServiceUnavailable)
123123
return
124124
}
125125

@@ -480,7 +480,7 @@ func handleAIRequest(ctx context.Context, w http.ResponseWriter, r *http.Request
480480

481481
// Check if there is capacity for the request.
482482
if !orch.CheckAICapacity(pipeline, modelID) {
483-
respondWithError(w, fmt.Sprintf("Insufficient capacity for pipeline=%v modelID=%v", pipeline, modelID), http.StatusServiceUnavailable)
483+
respondWithError(w, fmt.Sprintf("insufficient capacity for pipeline=%v modelID=%v", pipeline, modelID), http.StatusServiceUnavailable)
484484
return
485485
}
486486

server/ai_process.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ const defaultLiveVideoToVideoModelID = "noop"
4040
const defaultTextToSpeechModelID = "parler-tts/parler-tts-large-v1"
4141

4242
var errWrongFormat = fmt.Errorf("result not in correct format")
43-
var errInsufficientCapacity = errors.New("insufficient capacity")
4443

4544
type ServiceUnavailableError struct {
4645
err error

0 commit comments

Comments
 (0)