On Wed, Oct 14, 2020 at 02:27:11PM +0800, Cao Xueliang wrote:
- private def get_idle_job(tbox_group, testbox)
- job = prepare_job("sched/#{tbox_group}/idle", testbox)
- private def get_idle_job(tbox, testbox)
- queue_name = "sched/#{tbox}/idle"
- job = prepare_job(queue_name, testbox)
What's the different with when job.nil call prepare_job?
Submit all idle jobs. Next time will find directly without submitting again.
Thanks, RenWen
Thanks, Xueliang
# if there has no idle job, auto submit and get 1 if job.nil?
auto_submit_idle_job(tbox_group)
job = prepare_job("sched/#{tbox_group}/idle", testbox)
auto_submit_idle_job(tbox)
job = prepare_job(queue_name, testbox)
end
return job end
- def auto_submit_idle_job(tbox_group)
- full_path_patterns = "#{ENV["CCI_REPOS"]}/lab-#{ENV["lab"]}/allot/idle/#{tbox_group}/*.yaml"
- def auto_submit_idle_job(tbox)
- full_path_patterns = "#{ENV["CCI_REPOS"]}/lab-#{ENV["lab"]}/allot/idle/#{tbox}/*.yaml" extra_job_fields = [ "idle_job=true", "FLUENTD_SERVER_HOST=#{ENV["FLUENTD_SERVER_HOST"]}",
@@ -479,7 +480,7 @@ class Sched
Jobfile::Operate.auto_submit_job( full_path_patterns,
"testbox: #{tbox_group}",
end"testbox: #{tbox}", extra_job_fields) if Dir.glob(full_path_patterns).size > 0
-- 2.23.0