fix(lint): 修复 openai_gateway_handler 的 staticcheck 问题
This commit is contained in:
@@ -174,9 +174,11 @@ func (h *OpenAIGatewayHandler) Responses(c *gin.Context) {
|
|||||||
log.Printf("Account wait queue full: account=%d", account.ID)
|
log.Printf("Account wait queue full: account=%d", account.ID)
|
||||||
h.handleStreamingAwareError(c, http.StatusTooManyRequests, "rate_limit_error", "Too many pending requests, please retry later", streamStarted)
|
h.handleStreamingAwareError(c, http.StatusTooManyRequests, "rate_limit_error", "Too many pending requests, please retry later", streamStarted)
|
||||||
return
|
return
|
||||||
}
|
} else {
|
||||||
accountWaitRelease = func() {
|
// Only set release function if increment succeeded
|
||||||
h.concurrencyHelper.DecrementAccountWaitCount(c.Request.Context(), account.ID)
|
accountWaitRelease = func() {
|
||||||
|
h.concurrencyHelper.DecrementAccountWaitCount(c.Request.Context(), account.ID)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
accountReleaseFunc, err = h.concurrencyHelper.AcquireAccountSlotWithWaitTimeout(
|
accountReleaseFunc, err = h.concurrencyHelper.AcquireAccountSlotWithWaitTimeout(
|
||||||
|
|||||||
Reference in New Issue
Block a user