perf(storage): 拦截任务二进制并本地暂存结果
原因:任务标准结果中的 Base64、Data URI 和 Buffer 会进入 PostgreSQL JSON,导致 TOAST 与备份体积快速增长。 影响:新增统一 JSON 持久化关口;upload_none 将二进制原子写入本地结果目录,数据库仅保存带 SHA-256 的有界占位符;任务详情、同步响应、异步查询和兼容协议按需校验恢复。补充 24 小时清理、容量上限、历史小批量治理命令及管理端说明。 风险:本地结果超过 TTL、丢失或损坏时分别返回明确的 410/500;空间不足时返回 503 且不重试上游。未自动执行历史治理。 验证:三种真实图片模型同步/异步与幂等重放通过;Go vet/全量测试、前端 111 测试、lint/typecheck/build、OpenAPI、迁移安全、govulncheck、依赖审计、手工发布测试及 Linux amd64 构建通过。
This commit is contained in:
@@ -4738,6 +4738,12 @@
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.EasyAIGeneratedResponse"
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.EasyAIGeneratedResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5645,6 +5651,12 @@
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.VolcesErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.VolcesErrorEnvelope"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -6304,6 +6316,13 @@
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6404,6 +6423,13 @@
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -7883,6 +7909,12 @@
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
@@ -8305,6 +8337,12 @@
|
||||
"$ref": "#/definitions/httpapi.KelingCompatibleEnvelope"
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.KelingCompatibleEnvelope"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
@@ -8766,6 +8804,12 @@
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
|
||||
@@ -6821,6 +6821,10 @@ paths:
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.EasyAIGeneratedResponse'
|
||||
"410":
|
||||
description: Gone
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.EasyAIGeneratedResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 查询 server-main EasyAIClient 兼容任务结果
|
||||
@@ -7429,6 +7433,10 @@ paths:
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.VolcesErrorEnvelope'
|
||||
"410":
|
||||
description: Gone
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.VolcesErrorEnvelope'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 查询火山内容生成任务
|
||||
@@ -7829,6 +7837,11 @@ paths:
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
"410":
|
||||
description: Gone
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 查询可灵 V1 Omni 视频任务
|
||||
@@ -7893,6 +7906,11 @@ paths:
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
"410":
|
||||
description: Gone
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 按 ID 查询可灵 API 2.0 任务
|
||||
@@ -8852,6 +8870,10 @@ paths:
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"410":
|
||||
description: Gone
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
@@ -9123,6 +9145,10 @@ paths:
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
|
||||
"410":
|
||||
description: Gone
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
@@ -9421,6 +9447,10 @@ paths:
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"410":
|
||||
description: Gone
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
|
||||
Reference in New Issue
Block a user