feat(queue): 增加非文本模型分布式准入队列
使用 PostgreSQL 统一同步与异步非文本任务的并发准入、持久化等待和 Worker 容量分配,并将生产 API 与独立 Worker 角色拆分。 补充策略管理、共享契约、OpenAPI、Kubernetes 双节点 Worker 清单及跨节点验收脚本;未默认启用任何生产 queue_size 策略。 已在原基线完成 Go、前端、迁移、Shell、Kustomize 与长任务容量验收;合入最新主干后将重新执行发布门禁。
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package runner
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestDistributedAdmissionModelTypeBoundary(t *testing.T) {
|
||||
for _, modelType := range []string{
|
||||
"image_generate", "image_edit", "image_analysis", "image_vectorize",
|
||||
"video_generate", "video_enhance", "image_to_video", "text_to_video",
|
||||
"video_edit", "video_reference", "video_first_last_frame", "video_understanding", "omni_video", "omni",
|
||||
"audio_generate", "audio_understanding", "text_to_speech", "voice_clone",
|
||||
} {
|
||||
if !distributedAdmissionModelType(modelType) {
|
||||
t.Errorf("%s should use distributed admission", modelType)
|
||||
}
|
||||
}
|
||||
for _, modelType := range []string{"text_generate", "embedding", "rerank", "", "unknown"} {
|
||||
if distributedAdmissionModelType(modelType) {
|
||||
t.Errorf("%s should preserve immediate execution/rate-limit behavior", modelType)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user