feat: 支持工作流断点续跑并拆分错误信息存储
- 新增同会话+同工作流最近执行失败且参数一致时断点续跑逻辑 - exec_workflow/exec_chat 新增 error 字段存储原始错误,error_message 仅存友好提示 - 新增 UpdateExecChatReq 与 exec_chat_dao Update 方法 - 新增 GetLatestBySessionAndFlow 查询最近执行记录 - 修正 ListDates 分组与排序 SQL 表达式 - 新增 pipeline 配置结构,删除旧设计文档
This commit is contained in:
+12
-4
@@ -725,7 +725,8 @@ CREATE TABLE IF NOT EXISTS black_deacon_exec_chat (
|
||||
result_file_url VARCHAR(512) DEFAULT '', -- 结果文件路径(OSS)
|
||||
total_tokens INTEGER NOT NULL DEFAULT 0, -- 总token消耗
|
||||
total_fee DOUBLE PRECISION NOT NULL DEFAULT 0, -- 总费用
|
||||
error_message TEXT DEFAULT '' -- 错误信息
|
||||
error_message TEXT DEFAULT '', -- 错误信息(友好提示)
|
||||
error TEXT DEFAULT '' -- 错误明细(原始错误)
|
||||
);
|
||||
|
||||
-- 索引(高频查询)
|
||||
@@ -748,7 +749,10 @@ COMMENT ON COLUMN black_deacon_exec_chat.request_params IS '请求参数';
|
||||
COMMENT ON COLUMN black_deacon_exec_chat.result_file_url IS '结果文件路径(OSS)';
|
||||
COMMENT ON COLUMN black_deacon_exec_chat.total_tokens IS '总token消耗';
|
||||
COMMENT ON COLUMN black_deacon_exec_chat.total_fee IS '总费用';
|
||||
COMMENT ON COLUMN black_deacon_exec_chat.error_message IS '错误信息';
|
||||
COMMENT ON COLUMN black_deacon_exec_chat.error_message IS '错误信息(友好提示)';
|
||||
COMMENT ON COLUMN black_deacon_exec_chat.error IS '错误明细(原始错误)';
|
||||
-- 兼容已有库:错误信息拆分,error_message 存友好提示、error 存原始错误
|
||||
ALTER TABLE black_deacon_exec_chat ADD COLUMN IF NOT EXISTS error TEXT DEFAULT '';
|
||||
--------------------pgsql创建black_deacon_exec_chat表语句---------------------------
|
||||
|
||||
--------------------pgsql创建black_deacon_exec_workflow表语句---------------------------
|
||||
@@ -771,7 +775,8 @@ CREATE TABLE IF NOT EXISTS black_deacon_exec_workflow (
|
||||
status SMALLINT NOT NULL DEFAULT 1, -- 状态:1-运行中,2-成功,3-失败
|
||||
total_tokens INTEGER NOT NULL DEFAULT 0, -- 总token消耗
|
||||
total_fee DOUBLE PRECISION NOT NULL DEFAULT 0, -- 总费用
|
||||
error_message TEXT DEFAULT '' -- 错误信息
|
||||
error_message TEXT DEFAULT '', -- 错误信息(友好提示)
|
||||
error TEXT DEFAULT '' -- 错误明细(原始错误)
|
||||
);
|
||||
|
||||
-- 索引(高频查询)
|
||||
@@ -797,7 +802,10 @@ COMMENT ON COLUMN black_deacon_exec_workflow.request_params IS '请求参数';
|
||||
COMMENT ON COLUMN black_deacon_exec_workflow.status IS '状态:1-运行中,2-成功,3-失败';
|
||||
COMMENT ON COLUMN black_deacon_exec_workflow.total_tokens IS '总token消耗';
|
||||
COMMENT ON COLUMN black_deacon_exec_workflow.total_fee IS '总费用';
|
||||
COMMENT ON COLUMN black_deacon_exec_workflow.error_message IS '错误信息';
|
||||
COMMENT ON COLUMN black_deacon_exec_workflow.error_message IS '错误信息(友好提示)';
|
||||
COMMENT ON COLUMN black_deacon_exec_workflow.error IS '错误明细(原始错误)';
|
||||
-- 兼容已有库:错误信息拆分,error_message 存友好提示、error 存原始错误
|
||||
ALTER TABLE black_deacon_exec_workflow ADD COLUMN IF NOT EXISTS error TEXT DEFAULT '';
|
||||
--------------------pgsql创建black_deacon_exec_workflow表语句---------------------------
|
||||
|
||||
--------------------pgsql创建black_deacon_exec_workflow_result表语句---------------------------
|
||||
|
||||
Reference in New Issue
Block a user