MCPcopy Create free account
hub / github.com/QuantumNous/new-api / Run

Method Run

controller/system_task_handlers.go:104–112  ·  view source on GitHub ↗
(ctx context.Context, task *model.SystemTask, runnerID string)

Source from the content-addressed store, hash-verified

102}
103
104func (modelUpdateHandler) Run(ctx context.Context, task *model.SystemTask, runnerID string) {
105 payload := modelUpdateTaskPayload{}
106 if err := task.DecodePayload(&payload); err != nil {
107 finishSystemTaskHandler(task, runnerID, model.SystemTaskStatusFailed, nil, err)
108 return
109 }
110 summary := runChannelUpstreamModelUpdateTaskOnce(ctx, payload.Manual, !payload.Manual, service.NewSystemTaskProgressReporter(task, runnerID))
111 finishSystemTaskHandler(task, runnerID, model.SystemTaskStatusSucceeded, summary, nil)
112}
113
114// midjourneyPollHandler runs one Midjourney polling pass per scheduled run.
115// Enabled() folds the "are there unfinished tasks?" check into enablement so the

Callers

nothing calls this directly

Calls 4

finishSystemTaskHandlerFunction · 0.85
DecodePayloadMethod · 0.80

Tested by

no test coverage detected