MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / UpdateTaskByPlatform

Function UpdateTaskByPlatform

controller/task.go:72–83  ·  view source on GitHub ↗
(platform constant.TaskPlatform, taskChannelM map[int][]string, taskM map[string]*model.Task)

Source from the content-addressed store, hash-verified

70}
71
72func UpdateTaskByPlatform(platform constant.TaskPlatform, taskChannelM map[int][]string, taskM map[string]*model.Task) {
73 switch platform {
74 case constant.TaskPlatformMidjourney:
75 //_ = UpdateMidjourneyTaskAll(context.Background(), tasks)
76 case constant.TaskPlatformSuno:
77 _ = UpdateSunoTaskAll(context.Background(), taskChannelM, taskM)
78 case constant.TaskPlatformKling, constant.TaskPlatformJimeng:
79 _ = UpdateVideoTaskAll(context.Background(), platform, taskChannelM, taskM)
80 default:
81 common.SysLog("未知平台")
82 }
83}
84
85func UpdateSunoTaskAll(ctx context.Context, taskChannelM map[int][]string, taskM map[string]*model.Task) error {
86 for channelId, taskIds := range taskChannelM {

Callers 1

UpdateTaskBulkFunction · 0.85

Calls 3

SysLogFunction · 0.92
UpdateSunoTaskAllFunction · 0.85
UpdateVideoTaskAllFunction · 0.85

Tested by

no test coverage detected