Sha256: cf6237913dd48de7bf3f45e7bfaef8e83b02c8f05957a50b95c30a88c920b39b

Contents?: true

Size: 861 Bytes

Versions: 3

Compression:

Stored size: 861 Bytes

Contents

class Ey::Core::Cli::Web::Restart < Ey::Core::Cli::Web
  title "restart"
  summary "Restart all application servers in an environment"

  option :environment, short: "e", long: "environment", description: "Name or id of the environment to deploy to.", argument: "environment"
  option :account,     short: "c", long: "account",     description: "Name or id of the account that the environment resides in.", argument: "account"

  def handle
    operator, environment = core_operator_and_environment_for(options)

    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
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ey-core-3.1.2 lib/ey-core/cli/web/restart.rb
ey-core-3.1.1 lib/ey-core/cli/web/restart.rb
ey-core-3.1.0 lib/ey-core/cli/web/restart.rb