refactor(core): 任务与模型协议治理 - 拆分服务职责并禁止已发起任务取消

This commit is contained in:
ddCat
2026-08-22 09:52:09 +08:00
parent 7418ddfa9c
commit 633560a5d8
91 changed files with 6380 additions and 4247 deletions

View File

@@ -786,7 +786,7 @@ func proxySystemRequest(c *gin.Context, svc *service.Service, user *model.User,
log := apiCallLog(user, channel, billingOrderID, capability, protocol, c.Request.Method, path, target, body, c.GetHeader("Content-Type"), model.ApiCallStatusFailed, 0, time.Since(startedAt), err.Error(), concurrencyLimit)
log.ErrorCode, log.Error = service.ChannelSlotFailureDetails(err)
logSystemProxyCall(svc, log, nil)
fail(c, http.StatusServiceUnavailable, err)
failInternal(c, http.StatusServiceUnavailable, err)
return
}
defer releaseChannel()
@@ -976,12 +976,3 @@ func clearSessionCookie(c *gin.Context) {
Secure: secure,
})
}
func failService(c *gin.Context, err error) {
var authErr *service.AuthError
if errors.As(err, &authErr) {
fail(c, authErr.Status, errors.New(authErr.Message))
return
}
fail(c, http.StatusInternalServerError, err)
}