()
| 414 | } |
| 415 | |
| 416 | func (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 | |
| 433 | func activeSystemTaskStatuses() []string { |
| 434 | return []string{string(SystemTaskStatusPending), string(SystemTaskStatusRunning)} |
no test coverage detected