Signed-off-by: Zhang Yu 2134782174@qq.com --- src/scheduler/jobfile_operate.cr | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/scheduler/jobfile_operate.cr b/src/scheduler/jobfile_operate.cr index 98bf011..82ed885 100644 --- a/src/scheduler/jobfile_operate.cr +++ b/src/scheduler/jobfile_operate.cr @@ -80,16 +80,13 @@ module Jobfile::Operate job_content = job_content.as_h
# put job2sh in an array - if job_content.has_key?("job2sh") - tmp_job_sh_content = job_content["job2sh"] - - job_sh_array = [] of JSON::Any + job_sh_array = [] of JSON::Any + tmp_job_sh_content = job_content.delete("job2sh") + if tmp_job_sh_content tmp_job_sh_content.as_h.each do |_key, val| next if val == nil job_sh_array += val.as_a end - else - job_sh_array = [] of JSON::Any end
# generate job.yaml