Class: OpsDeploy::DeploymentWaiter

Inherits:
Waiter
  • Object
show all
Defined in:
lib/ops_deploy/waiter.rb

Overview

A waiter for deployments

Instance Attribute Summary

Attributes inherited from Waiter

#callback, #data, #end_when

Instance Method Summary collapse

Constructor Details

#initialize(opsworks, deployment, callback = nil) ⇒ DeploymentWaiter

Returns a new instance of DeploymentWaiter.



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/ops_deploy/waiter.rb', line 30

def initialize(opsworks, deployment, callback = nil)
  super() do
    find_deployment(opsworks, deployment.deployment_id)
  end

  @end_when = proc do |deployment_obj|
    deployment_obj.status != 'running'
  end

  @callback = callback
end