out.flush

This commit is contained in:
amartynov 2015-08-18 17:53:39 +03:00
parent feba8717b1
commit cb32c9126b
3 changed files with 7 additions and 1 deletions

View File

@ -16,13 +16,16 @@ module StackCommands
puts stack.stack_status
if stack.stack_status != 'CREATE_IN_PROGRESS'
mongo.stack_update(stack)
out << "Stack '#{stack.id}' status is now #{stack.stack_status}"
out << "Stack '#{stack.id}' status is now #{stack.stack_status}\n"
out.flush
break
end
out << "Next try...\n"
out.flush
end
rescue StandardError => e
logger.error e.message
out << "Error: #{e.message}\n"
return 5
end
end

View File

@ -211,6 +211,7 @@ module Provider
out << "Stack template: #{stack.stack_template}\n"
out << "Stack parameters: #{stack.parameters}\n"
out << "Stack template: #{stack.template_body}\n"
out.flush
response = cloud_formation.create_stack(stack.name,
{
'TemplateBody' => stack.template_body,
@ -220,6 +221,7 @@ module Provider
)
stack.id = response.body['StackId']
out << "Stack id: #{stack.id}\n"
out.flush
rescue Excon::Errors::Conflict => e
raise ProviderErrors::NameConflict
rescue Excon::Errors::BadRequest => br

View File

@ -30,6 +30,7 @@ class StackBootstrapWorker < Worker
sync_bootstrap_proc.call(out, stack, mongo)
out << "\nStack '#{stack.name}' has been created\n"
out.flush
servers = persist_stack_servers!(stack, provider)
unless options['stack_attributes']['without_bootstrap']
statuses = servers.map do |s|