|
|
@@ -1,7 +1,10 @@ |
|
|
package jcs |
|
|
package jcs |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
|
|
|
"encoding/json" |
|
|
"github.com/zeromicro/go-zero/core/logx" |
|
|
"github.com/zeromicro/go-zero/core/logx" |
|
|
|
|
|
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/database" |
|
|
|
|
|
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types" |
|
|
"gitlink.org.cn/JointCloud/pcm-openi/common" |
|
|
"gitlink.org.cn/JointCloud/pcm-openi/common" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
@@ -41,3 +44,16 @@ func StatusReport(url string, report *JobStatusReportReq) error { |
|
|
|
|
|
|
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func TempSaveReportToTask(store *database.AiStorage, task *types.TaskModel, report *JobStatusReportReq) error { |
|
|
|
|
|
jsonBytes, err := json.Marshal(report) |
|
|
|
|
|
|
|
|
|
|
|
task.Result = string(jsonBytes) |
|
|
|
|
|
|
|
|
|
|
|
err = store.UpdateTask(task) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
return err |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return nil |
|
|
|
|
|
} |