Class: Lono::Sets::Waiter
- Inherits:
-
Object
- Object
- Lono::Sets::Waiter
- Includes:
- Summarize
- Defined in:
- lib/lono/sets/waiter.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ Waiter
constructor
A new instance of Waiter.
- #run(operation_id) ⇒ Object
Methods included from Summarize
Methods included from AwsServices
#cfn, #ec2, #iam, #s3, #s3_presigner, #s3_resource, #sts
Methods included from AwsServices::Helper
#rollback_complete?, #testing_update?
Methods included from AwsServices::StackSet
#find_stack_set, #stack_set_exists?
Methods included from AwsServices::Stack
Constructor Details
#initialize(options) ⇒ Waiter
Returns a new instance of Waiter.
5 6 7 8 9 |
# File 'lib/lono/sets/waiter.rb', line 5 def initialize() @options = @stack = [:stack] @wait = @options[:wait].nil? ? true : @options[:wait] end |
Instance Method Details
#run(operation_id) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/lono/sets/waiter.rb', line 11 def run(operation_id) = "Deploying #{@stack} stack set" puts unless @options[:mute] return unless @wait status = Status.new(@options.merge(operation_id: operation_id)) success = status.wait summarize(operation_id) exit 1 unless success success end |