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:
@@ -0,0 +1,19 @@
|
||||
UPDATE file_storage_channels
|
||||
SET
|
||||
config = jsonb_set(
|
||||
config,
|
||||
'{scenes}',
|
||||
CASE
|
||||
WHEN jsonb_typeof(config->'scenes') = 'array'
|
||||
THEN (config->'scenes') || '["request_asset"]'::jsonb
|
||||
ELSE '["upload", "image_result", "request_asset"]'::jsonb
|
||||
END,
|
||||
true
|
||||
),
|
||||
updated_at = now()
|
||||
WHERE deleted_at IS NULL
|
||||
AND provider = 'server_main_openapi'
|
||||
AND (
|
||||
jsonb_typeof(config->'scenes') IS DISTINCT FROM 'array'
|
||||
OR NOT (COALESCE(config->'scenes', '[]'::jsonb) ? 'request_asset')
|
||||
);
|
||||
Reference in New Issue
Block a user