lib/sushi_fabric/sushiApp.rb in sushi_fabric-1.1.1 vs lib/sushi_fabric/sushiApp.rb in sushi_fabric-1.1.2
- old
+ new
@@ -1,8 +1,8 @@
#!/usr/bin/env ruby
# encoding: utf-8
-# Version = '20210813-192118'
+# Version = '20211015-142855'
require 'csv'
require 'fileutils'
require 'yaml'
require 'drb/drb'
@@ -18,10 +18,11 @@
config.gstore_dir = File.join(default_root, 'public/gstore/projects')
config.sushi_app_dir = default_root
config.scratch_dir = '/tmp/scratch'
config.module_source = nil
config.course_mode = nil
+ config.rails_host = nil
end
# load custmized parameters if there is
mode = ENV['RAILS_ENV']||'production'
config_file = File.join('./config/environments', mode)
@@ -39,10 +40,11 @@
config.gstore_dir = File.join(#{default_root}, 'public/gstore/projects')
config.sushi_app_dir = #{default_root}
config.scratch_dir = '/tmp/scratch'
config.module_source = nil
config.course_mode = nil
+ config.rails_host = nil
end
end
EOF
end
end
@@ -51,11 +53,11 @@
WORKFLOW_MANAGER = config.workflow_manager
GSTORE_DIR = config.gstore_dir
SUSHI_APP_DIR = config.sushi_app_dir
SCRATCH_DIR = config.scratch_dir
MODULE_SOURCE = config.module_source
-
+ RAILS_HOST = config.rails_host
unless File.exist?(GSTORE_DIR)
FileUtils.mkdir_p GSTORE_DIR
end
# check if there is a sqlite3 database of Ruby on Rails
@@ -522,10 +524,10 @@
@workflow_manager||=DRbObject.new_with_uri(WORKFLOW_MANAGER)
script_content = File.read(job_script)
job_id = 0
begin
#job_id = @workflow_manager.start_monitoring(job_script, @user, 0, script_content, project_number, gsub_options.join(' '), @gstore_script_dir)
- job_id = @workflow_manager.start_monitoring3(job_script, script_content, @user, project_number, gsub_options.join(' '), @gstore_script_dir, @next_dataset_id)
+ job_id = @workflow_manager.start_monitoring3(job_script, script_content, @user, project_number, gsub_options.join(' '), @gstore_script_dir, @next_dataset_id, RAILS_HOST)
rescue => e
time = Time.now.strftime("[%Y.%m.%d %H:%M:%S]")
@logger.error("*"*50)
@logger.error("submit_command error #{time}")
@logger.error("error: #{e}")