lib/sushi_fabric/sushiApp.rb in sushi_fabric-1.3.0 vs lib/sushi_fabric/sushiApp.rb in sushi_fabric-1.3.1
- old
+ new
@@ -1,8 +1,8 @@
#!/usr/bin/env ruby
# encoding: utf-8
-# Version = '20241121-112242'
+# Version = '20241122-134036'
require 'csv'
require 'fileutils'
require 'yaml'
require 'drb/drb'
@@ -79,10 +79,12 @@
)
require "#{SUSHI_APP_DIR}/app/models/project"
require "#{SUSHI_APP_DIR}/app/models/data_set"
require "#{SUSHI_APP_DIR}/app/models/sample"
require "#{SUSHI_APP_DIR}/app/models/job"
+ require "#{SUSHI_APP_DIR}/app/jobs/application_job"
+ require "#{SUSHI_APP_DIR}/app/jobs/make_whole_tree_job"
else
NO_ROR = true
end
class ::Hash
@@ -852,10 +854,11 @@
# copy application data to gstore
@next_dataset_tsv_path = save_next_dataset_as_tsv
if @dataset_sushi_id and dataset = DataSet.find_by_id(@dataset_sushi_id.to_i)
+ @project_id = dataset.project.id
data_set_arr = []
headers = []
rows = []
next_dataset_name = if name = @next_dataset_name
name.to_s
@@ -909,9 +912,15 @@
new_job.next_dataset_id = @next_dataset_id
new_job.save
new_job.data_set.jobs << new_job
new_job.data_set.save
end
+ end
+
+ # Update dataset tree
+ if @project_id
+ puts "# Update dataset tree by ActiveJob"
+ MakeWholeTreeJob.perform_later(@project_id)
end
copy_nextdataset
end
def run
test_run