lib/sushi_fabric/sushiApp.rb in sushi_fabric-1.1.8 vs lib/sushi_fabric/sushiApp.rb in sushi_fabric-1.1.9
- old
+ new
@@ -1,8 +1,8 @@
#!/usr/bin/env ruby
# encoding: utf-8
-# Version = '20220217-160253'
+# Version = '20230404-132741'
require 'csv'
require 'fileutils'
require 'yaml'
require 'drb/drb'
@@ -811,10 +811,11 @@
data_set.id
end
end
def save_parameters_in_sushi_db
if @next_dataset_id and next_dataset = DataSet.find_by_id(@next_dataset_id)
+ @output_params['sushi_app'] = self.class
next_dataset.job_parameters = @output_params
next_dataset.save
end
end
def main(mock=false)
@@ -849,10 +850,15 @@
next_dataset_name = if name = @next_dataset_name
name.to_s
else
"#{@name.gsub(/\s/,'').gsub(/_/,'')}_#{dataset.id}"
end
- data_set_arr = {'DataSetName'=>next_dataset_name, 'ProjectNumber'=>@project.gsub(/p/,''), 'ParentID'=>@dataset_sushi_id, 'Comment'=>@next_dataset_comment.to_s}
+ data_set_arr = if @params['next_dataset_root']
+ {'DataSetName'=>next_dataset_name, 'ProjectNumber'=>@project.gsub(/p/,''), 'Comment'=>@next_dataset_comment.to_s}
+ else
+ {'DataSetName'=>next_dataset_name, 'ProjectNumber'=>@project.gsub(/p/,''), 'ParentID'=>@dataset_sushi_id, 'Comment'=>@next_dataset_comment.to_s}
+ end
+
csv = CSV.readlines(@next_dataset_tsv_path, :col_sep=>"\t")
csv.each do |row|
if headers.empty?
headers = row
else