(platform constant.TaskPlatform, taskChannelM map[int][]string, taskM map[string]*model.Task)
| 70 | } |
| 71 | |
| 72 | func 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 | |
| 85 | func UpdateSunoTaskAll(ctx context.Context, taskChannelM map[int][]string, taskM map[string]*model.Task) error { |
| 86 | for channelId, taskIds := range taskChannelM { |
no test coverage detected