MCPcopy
hub / github.com/QuantumNous/new-api / UpdateVideoTaskAll

Function UpdateVideoTaskAll

controller/task_video.go:21–28  ·  view source on GitHub ↗
(ctx context.Context, platform constant.TaskPlatform, taskChannelM map[int][]string, taskM map[string]*model.Task)

Source from the content-addressed store, hash-verified

19)
20
21func UpdateVideoTaskAll(ctx context.Context, platform constant.TaskPlatform, taskChannelM map[int][]string, taskM map[string]*model.Task) error {
22 for channelId, taskIds := range taskChannelM {
23 if err := updateVideoTaskAll(ctx, platform, channelId, taskIds, taskM); err != nil {
24 logger.LogError(ctx, fmt.Sprintf("Channel #%d failed to update video async tasks: %s", channelId, err.Error()))
25 }
26 }
27 return nil
28}
29
30func updateVideoTaskAll(ctx context.Context, platform constant.TaskPlatform, channelId int, taskIds []string, taskM map[string]*model.Task) error {
31 logger.LogInfo(ctx, fmt.Sprintf("Channel #%d pending video tasks: %d", channelId, len(taskIds)))

Callers

nothing calls this directly

Calls 3

LogErrorFunction · 0.92
updateVideoTaskAllFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected