2352: set active to nil when Ready
authorradhika <radhika@curoverse.com>
Wed, 7 May 2014 23:54:23 +0000 (19:54 -0400)
committerradhika <radhika@curoverse.com>
Wed, 7 May 2014 23:54:23 +0000 (19:54 -0400)
sdk/cli/bin/arv-run-pipeline-instance
services/api/app/models/pipeline_instance.rb

index f0ada5d12aedcbfbacc7b3a2103b667d800dd89b..5f925ef2a747a4019f1d2fe6553fea4cb76187fc 100755 (executable)
@@ -416,7 +416,8 @@ class WhRunPipelineInstance
     if $options[:submit]
       @instance ||= PipelineInstance.
         create(:components => @components,
-              :pipeline_template_uuid => @template[:uuid])
+              :pipeline_template_uuid => @template[:uuid],
+              :state => 'New')
     else
       @instance ||= PipelineInstance.
         create(:components => @components,
index 258ee2729a54b07bc1eabb9cdd74d0aaffa43baa..32c284bb6d5f3a0b15c6504957eb43d619e789ff 100644 (file)
@@ -199,6 +199,10 @@ class PipelineInstance < ArvadosModel
         self.state = Ready
       end
     end
+
+    if self.state == Ready || self.state == New
+      self.active = nil
+    end 
   end
 
 end