Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
e1a9c1ec
Commit
e1a9c1ec
authored
Jan 01, 2026
by
IanShaw027
Browse files
fix(lint): 修复 openai_gateway_handler 的 staticcheck 问题
parent
9c889804
Changes
1
Show whitespace changes
Inline
Side-by-side
backend/internal/handler/openai_gateway_handler.go
View file @
e1a9c1ec
...
@@ -174,10 +174,12 @@ func (h *OpenAIGatewayHandler) Responses(c *gin.Context) {
...
@@ -174,10 +174,12 @@ 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
{
// Only set release function if increment succeeded
accountWaitRelease
=
func
()
{
accountWaitRelease
=
func
()
{
h
.
concurrencyHelper
.
DecrementAccountWaitCount
(
c
.
Request
.
Context
(),
account
.
ID
)
h
.
concurrencyHelper
.
DecrementAccountWaitCount
(
c
.
Request
.
Context
(),
account
.
ID
)
}
}
}
accountReleaseFunc
,
err
=
h
.
concurrencyHelper
.
AcquireAccountSlotWithWaitTimeout
(
accountReleaseFunc
,
err
=
h
.
concurrencyHelper
.
AcquireAccountSlotWithWaitTimeout
(
c
,
c
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment