Skip to content

Commit

Permalink
Merge pull request #8425 from tangruotian/2023-2-28-bugfix
Browse files Browse the repository at this point in the history
bug: 存在docker任务时会一直丢弃二进制任务 #8424
  • Loading branch information
irwinsun authored Feb 28, 2023
2 parents 8030c56 + 020dd5a commit 23517dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/agent/src/pkg/job/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ func DoPollAndBuild() {
func checkParallelTaskCount() (dockerCanRun bool, normalCanRun bool) {
// 检查docker任务
dockerInstanceCount := GBuildDockerManager.GetInstanceCount()
if config.GAgentConfig.DockerParallelTaskCount != 0 && dockerInstanceCount >= config.GAgentConfig.DockerParallelTaskCount {
// 临时方案,避免一直丢弃二进制任务,没有开docker的先不接受docker任务
if !config.GAgentConfig.EnableDockerBuild {
dockerCanRun = false
} else if config.GAgentConfig.DockerParallelTaskCount != 0 && dockerInstanceCount >= config.GAgentConfig.DockerParallelTaskCount {
logs.Info(fmt.Sprintf("DOCKER_JOB|parallel docker task count exceed , wait job done, "+
"maxJob config: %d, instance count: %d",
config.GAgentConfig.DockerParallelTaskCount, dockerInstanceCount))
Expand Down

0 comments on commit 23517dd

Please sign in to comment.