2352: when a running pipeline_instance is stopped in workbench, put it in Paused...
authorradhika <radhika@curoverse.com>
Thu, 8 May 2014 17:02:55 +0000 (13:02 -0400)
committerradhika <radhika@curoverse.com>
Thu, 8 May 2014 17:02:55 +0000 (13:02 -0400)
Similar behavior as when run with --run-here at command prompt.

services/api/app/models/pipeline_instance.rb

index 5993f99e97245ab5ceaebac8fee5e2d46b1873d0..2be4a066fcf245a668093542d367887860e4d9b3 100644 (file)
@@ -176,7 +176,10 @@ class PipelineInstance < ArvadosModel
           self.state = RunningOnServer
         end
       else
-        if self.components_look_ready?
+        if self.state == RunningOnServer # state was RunningOnServer
+          self.active = nil
+          self.state = Paused
+        elsif self.components_look_ready?
           self.state = Ready
         else
           self.state = New