[why] it can not set my queue when submit with --my-queue, because user maybe set tbox at config yaml, not using command lines
[how] each_jobs will load all config yaml, so move set queue under it.
Signed-off-by: Wei Jihui weijihuiall@163.com --- sbin/submit | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/sbin/submit b/sbin/submit index 23518eb0..cc2d940c 100755 --- a/sbin/submit +++ b/sbin/submit @@ -99,10 +99,6 @@ def find_jobfile(jobfile) exit 1 end
-def add_my_queue(job) - job['queue'] = "#{job['tbox_group']}~#{ENV['USER']}" -end - ARGV.each do |jobfile| jobfile = find_jobfile(jobfile) jobs = Job2sh.new @@ -112,12 +108,13 @@ ARGV.each do |jobfile| jobs[:expand_params] = true jobs['testbox'] = opt_set_key_value['testbox'] if opt_set_key_value['testbox'] jobs['tbox_group'] = tbox_group(jobs['testbox']) if jobs.include?('testbox') - add_my_queue(jobs) if opt_my_queue jobs['node_roles'] ||= 'server client' if jobs['cluster'] jobs.each_jobs do |job| raise 'Please configure SCHED_HOST' unless job['SCHED_HOST'] raise 'Please configure SCHED_PORT' unless job['SCHED_PORT']
+ job['queue'] = "#{jobs['tbox_group']}~#{ENV['USER']}" if opt_my_queue + job.add_pp job.add_monitors job.add_define_files if opt_auto_define_files