Method: App42::Command::App#scale

Defined in:
lib/app42/command/app.rb

#scaleObject

read app name and number of instance from user then scale app by no of instance



137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/app42/command/app.rb', line 137

def scale
  @options[:name] = get_app_name if @options[:name].nil?

  app_info = app_information 'app', @options[:name]
  scale_dedicated_app @options[:name] if app_info["appInfo"]["vmType"] && app_info["appInfo"]["vmType"] == "Dedicated"

  scale_type = ask_scale_type
  if scale_type == App42::SCALE_TYPE.first
    hscale @options[:name]
  else
    vscale @options[:name]
  end
end