Please ignore this mail.
On Wed, Oct 14, 2020 at 09:45:01PM +0800, Ren Wen wrote:
Job is saved into tbox_group queues when submitting, so find job from tbox_group queues.
When hostname is 'taishan200-2280-2s48p-256g--a11-12', first find job from 'taishan200-2280-2s48p-256g--a11', then find from 'taishan200-2280-2s48p-256g--a11-12'.
Signed-off-by: Ren Wen 15991987063@163.com
src/lib/sched.cr | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/lib/sched.cr b/src/lib/sched.cr index 2fbf05d..2fab207 100644 --- a/src/lib/sched.cr +++ b/src/lib/sched.cr @@ -417,10 +417,15 @@ class Sched end
private def find_job(testbox : String, count = 1)
- tbox = JobHelper.match_tbox_group(testbox)
- tbox_group = tbox.partition("--")[0]
- boxes = [testbox, tbox, tbox_group]
- # For example:
- # testbox : taishan200-2280-2s48p-256g--a11-12
- # tbox : taishan200-2280-2s48p-256g--a11
- # tbox_group : taishan200-2280-2s48p-256g
- sep = "--"
- tbox = testbox.sub(/(-\d+)+$/, "")
- tbox_group = tbox.rchop("#{sep}#{tbox.split(sep)[-1]}")
- boxes = [tbox, tbox_group] boxes.each do |box| count.times do job = prepare_job("sched/#{box}", testbox)
-- 2.23.0