buildbot使用什么算法将构建器分配给从属? [英] What algorithm does buildbot use to assign builders to slaves?

查看:83
本文介绍了buildbot使用什么算法将构建器分配给从属?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有一些生成器和两个从属计算机的buildbot。

I have a buildbot with some builders and two slave machines.

一些生成器可以在一个从属计算机上运行,​​而其中一些可以在两台计算机上运行。

Some of the builders can run on one slave, and some of them can run on both machines.

buildbot将使用哪种算法来计划构建?它会注意到某些构建器只能在一个从属服务器上运行,并且应该将可以在两个从属服务器上运行的构建器分配给需求较少的计算机吗?

What algorithm will buildbot use to schedule the builds? Will it notice that some builders can run on just one slave and that it should assign those that can run on both slaves to the less demanded one?

(我知道buildbot可以可以用于在Windows,Linux等多种体系结构上运行相同的构建。我们使用它来分发构建以提高性能,因为一个构建就足够了。)

(I know buildbot can be used to run the same build on multiple architectures, say Windows, Linux, etc. We are using it to distribute builds for performance, because a single build is enough for us).

推荐答案

首先,它获得该构建器附带的所有从属的列表。然后随机选择一个 。如果从服务器已经运行了超过 slave.max_builds 个构建,它将选择另一个。

First it gets a list of all the slaves attached to that builder. Then it picks one at random. If the slave is already running more than slave.max_builds builds, it picks another.

您可以覆盖< Builder 中的code> nextSlave 方法可更改选择从属的方式。传递给函数的参数将是 Builder 对象,以及 list buildbot。 buildslave.BuildSlave 对象。您必须返回后一个列表中的一项,或者

You can override the nextSlave method on the Builder to change the way slaves are chosen. The arguments passed to your function will be the Builder object, and a list of buildbot.buildslave.BuildSlave objects. You have to return one of the items of the latter list, or None.

这篇关于buildbot使用什么算法将构建器分配给从属?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆