2762: Merge branch 'master' into 2762-owner-uuid-integrity
authorTom Clegg <tom@curoverse.com>
Wed, 14 May 2014 22:02:51 +0000 (18:02 -0400)
committerTom Clegg <tom@curoverse.com>
Wed, 14 May 2014 22:02:51 +0000 (18:02 -0400)
1  2 
services/api/app/models/pipeline_instance.rb

index 9ce0c4dec17f74897988f612156a3b03b59ef6fa,8eb0b9b94b294d2798faa288e14824d29eda156e..7bb814c60d4a902d15a61485952ead0437a96cbe
@@@ -1,5 -1,5 +1,5 @@@
  class PipelineInstance < ArvadosModel
 -  include AssignUuid
 +  include HasUuid
    include KindAndEtag
    include CommonApiTemplate
    serialize :components, Hash
          return false
        end
      elsif 'success'.in? changed_attributes
+       logger.info "pipeline_instance changed_attributes has success for #{self.uuid}"
        if self.success
          self.active = false
          self.state = Complete
          self.state = Failed
        end
      elsif 'active'.in? changed_attributes
+       logger.info "pipeline_instance changed_attributes has active for #{self.uuid}"
        if self.active
          if self.state.in? [New, Ready, Paused]
            self.state = RunningOnServer
      end
  
      if new_record? or 'components'.in? changed_attributes
-       state ||= New
-       if state == New and self.components_look_ready?
+       self.state ||= New
+       if self.state == New and self.components_look_ready?
          self.state = Ready
        end
      end