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

@@ -148,7 +148,7 @@ func enforceRateLimit(c *gin.Context, key string, limit int, window time.Duratio
func loadRuntimePolicy(c *gin.Context, svc *service.Service) (service.RuntimePolicySetting, bool) {
policy, err := svc.RuntimePolicy()
if err != nil {
fail(c, http.StatusServiceUnavailable, errors.New("读取运行时策略失败:"+err.Error()))
failInternal(c, http.StatusServiceUnavailable, err)
return service.RuntimePolicySetting{}, false
}
return policy, true