add picard-casm statistics to factory job summary
[arvados.git] / app / models / pipeline_invocation.rb
1 class PipelineInvocation < OrvosBase
2   attr_accessor :pipeline
3
4   def update_job_parameters(new_params)
5     self.components[:steps].each_with_index do |step, i|
6       step[:params].each do |param|
7         if new_params.has_key?(new_param_name = "#{i}/#{param[:name]}") or
8             new_params.has_key?(new_param_name = "#{step[:name]}/#{param[:name]}") or
9             new_params.has_key?(new_param_name = param[:name])
10           param_type = :value
11           %w(hash data_locator).collect(&:to_sym).each do |ptype|
12             param_type = ptype if param.has_key? ptype
13           end
14           param[param_type] = new_params[new_param_name]
15         end
16       end
17     end
18   end
19 end