MCPcopy Create free account
hub / github.com/cloudfoundry/multiapps-cli-plugin / Execute

Method Execute

commands/action.go:93–108  ·  view source on GitHub ↗
(operationID string, mtaClient mtaclient.MtaClientOperations)

Source from the content-addressed store, hash-verified

91}
92
93func (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
110func getMonitoringOperation(operationID string, mtaClient mtaclient.MtaClientOperations) (*models.Operation, error) {
111 return mtaClient.GetMtaOperation(operationID, "messages")

Callers

nothing calls this directly

Calls 6

FailedFunction · 0.92
NewClientErrorFunction · 0.92
getMonitoringOperationFunction · 0.85
NewExecutionMonitorFunction · 0.85
executeInSessionMethod · 0.80
MonitorMethod · 0.80

Tested by

no test coverage detected