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

Method ToResponse

model/system_task.go:416–431  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

414}
415
416func (task *SystemTask) ToResponse() SystemTaskResponse {
417 return SystemTaskResponse{
418 ID: task.ID,
419 TaskID: task.TaskID,
420 Type: task.Type,
421 Status: task.Status,
422 ActiveKey: task.ActiveKey,
423 Payload: decodeSystemTaskJSONValue(task.Payload),
424 State: decodeSystemTaskJSONValue(task.State),
425 Result: decodeSystemTaskJSONValue(task.Result),
426 Error: task.Error,
427 LockedBy: task.LockedBy,
428 CreatedAt: task.CreatedAt,
429 UpdatedAt: task.UpdatedAt,
430 }
431}
432
433func activeSystemTaskStatuses() []string {
434 return []string{string(SystemTaskStatusPending), string(SystemTaskStatusRunning)}

Callers 5

GetCurrentSystemTaskFunction · 0.45
ListSystemTasksFunction · 0.45
GetSystemTaskFunction · 0.45
ListSystemInstancesFunction · 0.45

Calls 1

Tested by

no test coverage detected