Class: Ey::Core::Cli::Web::Restart
- Inherits:
-
Subcommand
- Object
- Belafonte::App
- Subcommand
- Ey::Core::Cli::Web::Restart
- Defined in:
- lib/ey-core/cli/web/restart.rb
Instance Method Summary collapse
Methods inherited from Subcommand
#handle_core_error, #run_handle, #setup
Methods included from Helpers::Core
#core_account, #core_accounts, #core_application_for, #core_client, #core_environment_for, #core_operator_and_environment_for, #core_server_for, #core_url, #core_yaml, #eyrc_yaml, included, #longest_length_by_name, #operator, #unauthenticated_core_client, #write_core_yaml
Instance Method Details
#handle ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/ey-core/cli/web/restart.rb', line 23 def handle operator, environment = core_operator_and_environment_for() puts "Restarting application servers in #{environment.name}".green request = environment.restart_app_servers request.wait_for { |r| r.ready? } if request.successful puts "Successfully restarted application servers".green else puts "Restarting application servers has failed".red ap request end end |