Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: 修改任务下发runner选择策略为轮循 #725

Merged
merged 3 commits into from
Nov 23, 2022

Conversation

licairong
Copy link
Contributor

No description provided.

Copy link
Contributor

@jxinging jxinging left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还有,不传 tags 是否也应该软询选择一个 runner?

@@ -308,6 +310,11 @@ func matchVar(v forms.SampleVariables, value models.Variable) bool {
}

func GetRunnerByTags(tags []string) (string, e.Error) {
tags_str := strings.Join(tags, ",")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tags 要不要排个序再组装成 tags_str,确保 tags 的传入顺序不影响 tags_str 的值

} else {
runnerTagsIndex.Store(tags_str, 0)
}
return validRunners[rid].ID, nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里要保证 rid 不越界,有可能 runner 数量会减少

@xiaohei417 xiaohei417 merged commit 6ea2057 into dev Nov 23, 2022
@xiaohei417 xiaohei417 deleted the feat_runner_round_robin branch November 23, 2022 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants