()
| 430 | } |
| 431 | |
| 432 | func (task *SystemTask) ToResponse() SystemTaskResponse { |
| 433 | return SystemTaskResponse{ |
| 434 | ID: task.ID, |
| 435 | TaskID: task.TaskID, |
| 436 | Type: task.Type, |
| 437 | Status: task.Status, |
| 438 | ActiveKey: task.ActiveKey, |
| 439 | Payload: decodeSystemTaskJSONValue(task.Payload), |
| 440 | State: decodeSystemTaskJSONValue(task.State), |
| 441 | Result: decodeSystemTaskJSONValue(task.Result), |
| 442 | Error: task.Error, |
| 443 | LockedBy: task.LockedBy, |
| 444 | CreatedAt: task.CreatedAt, |
| 445 | UpdatedAt: task.UpdatedAt, |
| 446 | } |
| 447 | } |
| 448 | |
| 449 | func activeSystemTaskStatuses() []string { |
| 450 | return []string{string(SystemTaskStatusPending), string(SystemTaskStatusRunning)} |
no test coverage detected