(operationID string, mtaClient mtaclient.MtaClientOperations)
| 91 | } |
| 92 | |
| 93 | func (a *monitoringAction) Execute(operationID string, mtaClient mtaclient.MtaClientOperations) ExecutionStatus { |
| 94 | // Get the messages of the operation before it's retried/resumed, so that the monitor knows they're from the previous execution and |
| 95 | // should not show them again. |
| 96 | operation, err := getMonitoringOperation(operationID, mtaClient) |
| 97 | if err != nil { |
| 98 | ui.Failed("Could not monitor multi-target app operation with ID %s: %s", terminal.EntityNameColor(operationID), baseclient.NewClientError(err)) |
| 99 | return Failure |
| 100 | } |
| 101 | |
| 102 | status := a.executeInSession(operationID, mtaClient) |
| 103 | if status == Failure { |
| 104 | return status |
| 105 | } |
| 106 | |
| 107 | return NewExecutionMonitor(a.commandName, operationID, "messages", a.monitoringRetries, operation.Messages, mtaClient).Monitor() |
| 108 | } |
| 109 | |
| 110 | func getMonitoringOperation(operationID string, mtaClient mtaclient.MtaClientOperations) (*models.Operation, error) { |
| 111 | return mtaClient.GetMtaOperation(operationID, "messages") |
nothing calls this directly
no test coverage detected