Class: OpsDeploy::DeploymentWaiter
- Defined in:
- lib/ops_deploy/waiter.rb
Instance Attribute Summary
Attributes inherited from Waiter
Instance Method Summary collapse
-
#initialize(opsworks, deployment, callback = nil) ⇒ DeploymentWaiter
constructor
A new instance of DeploymentWaiter.
Constructor Details
#initialize(opsworks, deployment, callback = nil) ⇒ DeploymentWaiter
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/ops_deploy/waiter.rb', line 28 def initialize(opsworks, deployment, callback = nil) super() { deploy = opsworks.describe_deployments(deployment_ids: [deployment.deployment_id]).deployments.first # Retry if there's no duration if deploy.status != "running" and deploy.duration.nil? deploy = opsworks.describe_deployments(deployment_ids: [deployment.deployment_id]).deployments.first end deploy } @end_when = Proc.new { |deployment_obj| deployment_obj.status != "running" } @callback = callback end |