Method: Appfront::Command::Ps.force_restart

Defined in:
lib/appfront/command/ps.rb

.force_restart(args, opts) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/appfront/command/ps.rb', line 17

def self.force_restart(args, opts)
  find_deploy! opts
  api.put "/flow/#{@deploy}/force-restart"

  spinner "Force restarting Deploy..." do
    loop do
      sleep 3
      info = api.get "/flow/#{@deploy}"
      break if info['status'] == 'running'
    end
  end
  puts "\n"
end