[why] When sh_on_fail is nil, on_fail will add to the job.yaml
Signed-off-by: Hu XueJiao 1034502035@qq.com --- sbin/submit | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sbin/submit b/sbin/submit index a325e912..9bba1018 100755 --- a/sbin/submit +++ b/sbin/submit @@ -121,11 +121,14 @@ ARGV.each do |jobfile| 'job2sh' => { 'run_job' => sh_run_job, 'extract_stats' => sh_extract_stats, - 'define_files' => sh_define_files, - 'on_fail' => sh_on_fail + 'define_files' => sh_define_files } }
+ if sh_on_fail + sh_hash['job2sh']['on_fail'] = sh_on_fail + end + # merge job info job_hash = job.to_hash job_hash_list << job_hash