buildbot 使用什么算法将构建者分配给奴隶?

发布于 2024-08-20 14:31:11 字数 257 浏览 6 评论 0原文

我有一个带有一些构建器和两台从机的构建机器人。

有些构建器可以在一台从机上运行,​​有些可以在两台机器上运行。

buildbot 将使用什么算法来安排构建?它是否会注意到某些构建器只能在一个从属设备上运行,并且它应该将那些可以在两个从属设备上运行的构建器分配给需求较少的构建器?

(我知道 buildbot 可用于在多种架构(例如 Windows、Linux 等)上运行相同的构建。我们使用它来分发构建以提高性能,因为单个构建对我们来说就足够了)。

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.

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?

(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).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不再见 2024-08-27 14:31:11

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

您可以重写 Builder 上的 nextSlave 方法来更改选择从属设备的方式。传递给函数的参数将是 Builder 对象和 buildbot.buildslave.BuildSlave 对象的列表。您必须返回后一个列表中的一项,或者None

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.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文