[ARVADOS] updated: 124f97839678dc7497200a6745165304a656bb71
git at public.curoverse.com
git at public.curoverse.com
Mon Apr 21 12:27:27 EDT 2014
Summary of changes:
services/api/app/models/pipeline_instance.rb | 25 ++++++++-----------
.../20140417195429_pipeline_instance_state.rb | 4 ---
2 files changed, 11 insertions(+), 18 deletions(-)
via 124f97839678dc7497200a6745165304a656bb71 (commit)
from 9c8f3677ae05a7d8d25415d56757e362ffd45084 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 124f97839678dc7497200a6745165304a656bb71
Author: radhika chippada <radhika at curoverse.com>
Date: Mon Apr 21 12:12:47 2014 -0400
Mark set_state_for_new_pipeline as a protected method.
diff --git a/services/api/app/models/pipeline_instance.rb b/services/api/app/models/pipeline_instance.rb
index f18fa3a..fce607a 100644
--- a/services/api/app/models/pipeline_instance.rb
+++ b/services/api/app/models/pipeline_instance.rb
@@ -46,20 +46,6 @@ class PipelineInstance < ArvadosModel
self.state == Complete
end
- def set_state state
- self.state = state
- end
-
- def set_state_for_new_pipeline
- if !self.state || self.state == New
- if PipelineInstance.is_ready self.components
- self.state = Ready
- else
- self.state = New
- end
- end
- end
-
# if a legacy client tries to update active or success attributes, convert to state
def update_attribute name, value
if name == 'success'
@@ -178,4 +164,15 @@ class PipelineInstance < ArvadosModel
{}
end
end
+
+ def set_state_for_new_pipeline
+ if !self.state || self.state == New
+ if PipelineInstance.is_ready self.components
+ self.state = Ready
+ else
+ self.state = New
+ end
+ end
+ end
+
end
diff --git a/services/api/db/migrate/20140417195429_pipeline_instance_state.rb b/services/api/db/migrate/20140417195429_pipeline_instance_state.rb
index 6f43005..50230c7 100644
--- a/services/api/db/migrate/20140417195429_pipeline_instance_state.rb
+++ b/services/api/db/migrate/20140417195429_pipeline_instance_state.rb
@@ -8,10 +8,6 @@ class PipelineInstanceState < ActiveRecord::Migration
act_as_system_user do
PipelineInstance.all.each do |pi|
pi.state = PipelineInstance::New
-puts "\ninstance = #{pi.inspect}"
-puts "\nid = #{pi.id}"
-puts "\nsuccess = #{pi[:success]}"
-puts "\nactive = #{pi[:active]}"
if !pi.attribute_present? :success # success is nil
if pi[:active] == true
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list