| 73 | } |
| 74 | |
| 75 | func (cmd ScaleCommand) translateErrors(err error) error { |
| 76 | if _, ok := err.(actionerror.StartupTimeoutError); ok { |
| 77 | return translatableerror.StartupTimeoutError{ |
| 78 | AppName: cmd.RequiredArgs.AppName, |
| 79 | BinaryName: cmd.Config.BinaryName(), |
| 80 | } |
| 81 | } else if _, ok := err.(actionerror.AllInstancesCrashedError); ok { |
| 82 | return translatableerror.ApplicationUnableToStartError{ |
| 83 | AppName: cmd.RequiredArgs.AppName, |
| 84 | BinaryName: cmd.Config.BinaryName(), |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | return err |
| 89 | } |
| 90 | |
| 91 | func (cmd ScaleCommand) scaleProcess(appGUID string, username string) (bool, error) { |
| 92 | cmd.UI.DisplayTextWithFlavor("Scaling app {{.AppName}} in org {{.OrgName}} / space {{.SpaceName}} as {{.Username}}...", map[string]interface{}{ |