Every user has a subqueue, user's email by default. Queue will be "queue/subqueue" when submitting job.
Signed-off-by: Ren Wen 15991987063@163.com --- src/lib/job.cr | 6 ++++++ src/scheduler/submit_job.cr | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 7ded6d8..0083a7d 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,10 @@ class Job end end
+ private def set_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..3909cb7 100644 --- a/src/scheduler/submit_job.cr +++ b/src/scheduler/submit_job.cr @@ -107,7 +107,7 @@ class Sched # success: [{"job_id" => job_id, "message" => "", job_state => "submit"}] # failure: [{"job_id" => "0", "message" => err_msg, job_state => "submit"}] def submit_single_job(job) - queue = job.queue + queue = "#{job.queue}/#{job.subqueue}"
# only single job will has "idle job" and "execute rate limiter" if job["idle_job"].empty?