X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fadf2b0fe1240f607fc91d65d6831621262afeb1..ebb166d65eb37f89edeccfc5be97014f3f2a73e2:/services/api/app/models/pipeline_instance.rb diff --git a/services/api/app/models/pipeline_instance.rb b/services/api/app/models/pipeline_instance.rb index 9ce0c4dec1..7bb814c60d 100644 --- a/services/api/app/models/pipeline_instance.rb +++ b/services/api/app/models/pipeline_instance.rb @@ -166,6 +166,7 @@ class PipelineInstance < ArvadosModel 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 @@ -174,6 +175,7 @@ class PipelineInstance < ArvadosModel 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 @@ -194,8 +196,8 @@ class PipelineInstance < ArvadosModel 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