refactor(task): 重构异步任务处理流程

This commit is contained in:
2026-05-27 09:36:26 +08:00
parent 2548ffc7ac
commit d74559ae74
10 changed files with 162 additions and 212 deletions

View File

@@ -4,10 +4,10 @@ import "gitea.com/red-future/common/beans"
type ComposeSession struct {
beans.SQLBaseDO `orm:",inline"`
SessionId string `orm:"session_id" json:"sessionId"`
RequestContent any `orm:"request_content" json:"requestContent"`
ResponseContent any `orm:"response_content" json:"responseContent"`
Remark string `orm:"remark" json:"remark"`
SessionId string `orm:"session_id" json:"sessionId"`
RequestContent map[string]any `orm:"request_content" json:"requestContent"`
ResponseContent map[string]any `orm:"response_content" json:"responseContent"`
Remark string `orm:"remark" json:"remark"`
}
type composeSessionCol struct {

View File

@@ -11,7 +11,7 @@ type ComposeTask struct {
CallbackUrl string `orm:"callback_url" json:"callbackUrl"`
GatewayState int `orm:"gateway_state" json:"gatewayState"`
RequestPayload map[string]any `orm:"request_payload" json:"requestPayload"`
ResultText string `orm:"result_text" json:"resultText"`
ResultText map[string]any `orm:"result_text" json:"resultText"`
Messages map[string]any `orm:"messages" json:"messages"`
Status string `orm:"status" json:"status"`
ErrorMessage string `orm:"error_message" json:"errorMessage"`