[PATCH v3 compass-ci] fix: sched: find and submit idle job using tbox_group

Using tbox_group to find and submit idle jobs. Example: Here is a hostname: taishan200-2280-2s48p-256g--a11-<sn> Before: using taishan200-2280-2s48p-256g Now: using taishan200-2280-2s48p-256g--a11 Signed-off-by: Ren Wen <15991987063@163.com> --- src/lib/sched.cr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/sched.cr b/src/lib/sched.cr index 2fbf05d..223a30c 100644 --- a/src/lib/sched.cr +++ b/src/lib/sched.cr @@ -417,10 +417,10 @@ class Sched end private def find_job(testbox : String, count = 1) - tbox = JobHelper.match_tbox_group(testbox) - tbox_group = tbox.partition("--")[0] + tbox_group = JobHelper.match_tbox_group(testbox) + tbox = tbox.partition("--")[0] - boxes = [testbox, tbox, tbox_group] + boxes = [testbox, tbox_group, tbox] boxes.each do |box| count.times do job = prepare_job("sched/#{box}", testbox) -- 2.23.0

On Thu, Oct 15, 2020 at 10:16:19AM +0800, Ren Wen wrote:
Using tbox_group to find and submit idle jobs.
Example: Here is a hostname: taishan200-2280-2s48p-256g--a11-<sn> Before: using taishan200-2280-2s48p-256g Now: using taishan200-2280-2s48p-256g--a11
Signed-off-by: Ren Wen <15991987063@163.com> --- src/lib/sched.cr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lib/sched.cr b/src/lib/sched.cr index 2fbf05d..223a30c 100644 --- a/src/lib/sched.cr +++ b/src/lib/sched.cr @@ -417,10 +417,10 @@ class Sched end
private def find_job(testbox : String, count = 1) - tbox = JobHelper.match_tbox_group(testbox) - tbox_group = tbox.partition("--")[0] + tbox_group = JobHelper.match_tbox_group(testbox) + tbox = tbox.partition("--")[0]
tbox = tbox.partition("--")[0] ----- There has an error: 'tbox' -> 'tbox_group' Thanks, RenWen
- boxes = [testbox, tbox, tbox_group] + boxes = [testbox, tbox_group, tbox] boxes.each do |box| count.times do job = prepare_job("sched/#{box}", testbox) -- 2.23.0
participants (1)
-
Ren Wen