Every user has a subqueue, user's email by default. Queue will be "queue/subqueue" when submitting job.
Example: queue : vm-2p8g.aarch64 subqueue: zs@xxx.com
will submit to: vm-2p8g.aarch64/zs@xxx.com
Signed-off-by: Ren Wen 15991987063@163.com --- src/lib/job.cr | 9 +++++++++ src/scheduler/submit_job.cr | 2 ++ 2 files changed, 11 insertions(+)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 7ded6d8..5e56fff 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -80,6 +80,7 @@ class Job testbox lab queue + subqueue initrd_pkg initrd_deps initrds_uri @@ -161,6 +162,7 @@ class Job set_lkp_server() set_sshr_info() set_queue() + set_subqueue() end
private def set_kernel @@ -266,6 +268,13 @@ class Job end end
+ private def set_subqueue + return unless self["subqueue"].empty? + + # set default subqueue + self["subqueue"] = self["my_email"] + end + # if not assign tbox_group, set it to a match result from testbox # ?if job special testbox, should we just set tbox_group=textbox private def update_tbox_group_from_testbox diff --git a/src/scheduler/submit_job.cr b/src/scheduler/submit_job.cr index f93ad2b..7841736 100644 --- a/src/scheduler/submit_job.cr +++ b/src/scheduler/submit_job.cr @@ -108,6 +108,8 @@ class Sched # failure: [{"job_id" => "0", "message" => err_msg, job_state => "submit"}] def submit_single_job(job) queue = job.queue + subqueue = job.subqueue + queue += "/#{subqueue}"
# only single job will has "idle job" and "execute rate limiter" if job["idle_job"].empty?