lib/simple_deploy/stack/deployment/status.rb in simple_deploy-0.7.2 vs lib/simple_deploy/stack/deployment/status.rb in simple_deploy-0.7.3
- old
+ new
@@ -2,15 +2,15 @@
class Stack
class Deployment
class Status
def initialize(args)
- @config = args[:config]
+ @config = SimpleDeploy.config
+ @logger = SimpleDeploy.logger
@stack = args[:stack]
@ssh_user = args[:ssh_user]
@name = args[:name]
- @logger = @config.logger
end
def clear_for_deployment?
!deployment_in_progress?
end
@@ -41,10 +41,12 @@
'deployment_datetime' => Time.now.to_s } ]
end
def unset_deployment_in_progress
@logger.debug "Clearing deployment in progress for #{@name}."
- @stack.update :attributes => [ { 'deployment_in_progress' => 'false' } ]
+ @stack.in_progress_update :attributes => [
+ { 'deployment_in_progress' => 'false' } ],
+ :caller => self
end
private
def attributes