Run resources.Task runs the provided command in the application environment associated with the provided application GUID.
(appGUID string, task resources.Task)
| 16 | // Run resources.Task runs the provided command in the application environment associated |
| 17 | // with the provided application GUID. |
| 18 | func (actor Actor) RunTask(appGUID string, task resources.Task) (resources.Task, Warnings, error) { |
| 19 | createdTask, warnings, err := actor.CloudControllerClient.CreateApplicationTask(appGUID, resources.Task(task)) |
| 20 | if err != nil { |
| 21 | if e, ok := err.(ccerror.TaskWorkersUnavailableError); ok { |
| 22 | return resources.Task{}, Warnings(warnings), actionerror.TaskWorkersUnavailableError{Message: e.Error()} |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | return resources.Task(createdTask), Warnings(warnings), err |
| 27 | } |
| 28 | |
| 29 | // GetApplicationTasks returns a list of tasks associated with the provided |
| 30 | // application GUID. |
nothing calls this directly
no test coverage detected