pollTaskPluginImageTask runs one poll round for a single task through the same code path as the scheduled task poller, including status CAS and completion settlement.
(ctx context.Context, task *model.Task)
| 207 | // same code path as the scheduled task poller, including status CAS and |
| 208 | // completion settlement. |
| 209 | func pollTaskPluginImageTask(ctx context.Context, task *model.Task) error { |
| 210 | upstreamID := task.GetUpstreamTaskID() |
| 211 | if upstreamID == "" { |
| 212 | return errors.New("task has no upstream id") |
| 213 | } |
| 214 | return service.UpdateVideoTasks(ctx, task.Platform, map[int][]string{task.ChannelId: {upstreamID}}, map[string]*model.Task{upstreamID: task}) |
| 215 | } |
| 216 | |
| 217 | func taskPluginImageResponseFormat(request pluginruntime.ProtocolRequestContext) string { |
| 218 | body, ok := request.Body.(map[string]any) |
nothing calls this directly
no test coverage detected