feat(cluster): 增加跨节点任务执行与请求素材场景
新增 AI_GATEWAY_ASYNC_QUEUE_WORKER_ENABLED,默认保持启用;关闭时仅停止 River 异步任务执行器,HTTP、健康检查、结算与其他后台任务继续运行。 新增 0089 迁移并同步管理端默认场景,将 request_asset 加入现有上传渠道,确保 multipart 请求素材先转换为跨节点共享 URL。 验证:gofmt、go test ./... -count=1、go vet ./...、pnpm lint、pnpm test、pnpm build、迁移测试。
This commit is contained in:
@@ -82,6 +82,18 @@ func TestValidateAsyncWorkerSettings(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadAsyncQueueWorkerEnabled(t *testing.T) {
|
||||
cfg := Load()
|
||||
if !cfg.AsyncQueueWorkerEnabled {
|
||||
t.Fatal("async queue worker must be enabled by default")
|
||||
}
|
||||
t.Setenv("AI_GATEWAY_ASYNC_QUEUE_WORKER_ENABLED", "false")
|
||||
cfg = Load()
|
||||
if cfg.AsyncQueueWorkerEnabled {
|
||||
t.Fatal("async queue worker remained enabled after explicit disable")
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidateTaskHistorySettings(t *testing.T) {
|
||||
cfg := Load()
|
||||
cfg.TaskRetentionDays = 30
|
||||
|
||||
Reference in New Issue
Block a user