返回介绍

3.5.21. worker

发布于 2023-09-20 23:50:40 字数 10251 浏览 0 评论 0 收藏 0

Caution

Buildbot no longer supports Python 2.7 on the Buildbot master.

3.5.21. worker

resource type: worker
Attributes:
  • workerid (integer) – the ID of this worker

  • configured_on[]

    list of builders on masters this worker is configured on

    • builderid (integer)

    • masterid (integer)

  • connected_to[]

    list of masters this worker is attached to

    • masterid (integer)

  • name (string) – the name of the worker

  • paused (bool) – the worker is paused if it is connected but doesn’t accept new builds

  • graceful (bool) – the worker is graceful if it doesn’t accept new builds, and will shutdown when builds are finished

  • workerinfo (object) –

    information about the worker

    The worker information can be any JSON-able object. In practice, it contains the following keys, based on information provided by the worker:

    • admin (the admin information)

    • host (the name of the host)

    • access_uri (the access URI)

    • version (the version on the worker)

A worker resource represents a worker to the source code monitored by Buildbot.

The contents of the connected_to and configured_on attributes are sensitive to the context of the request. If a builder or master is specified in the path, then only the corresponding connections and configurations are included in the result.

3.5.21.1. Endpoints

path: /builders/{builderid_or_buildername}/workers
Path Keys:

builderid_or_buildername (number|identifier) – the ID or name of the builder

This path selects all workers configured for a given builder

GET
returns

collection of worker

path: /builders/{builderid_or_buildername}/workers/{name}
Path Keys:
  • builderid_or_buildername (number|identifier) – the ID or name of the builder

  • name (identifier) – the name of the worker

This path selects a worker by name filtered by given builderid

GET
returns

collection of worker

path: /builders/{builderid_or_buildername}/workers/{workerid}
Path Keys:
  • builderid_or_buildername (number|identifier) – the ID or name of the builder

  • workerid (number) – the id of the worker

This path selects a worker by id filtered by given builderid

GET
returns

collection of worker

POST with method: /builders/{builderid_or_buildername}/workers/{workerid} (method=stop)
Body keys:
  • method (string) – must be stop

  • reason (string) – The reason why the worker was stopped

POST with method: /builders/{builderid_or_buildername}/workers/{workerid} (method=kill)
Body keys:
  • method (string) – must be kill

  • reason (string) – The reason why the worker was stopped

POST with method: /builders/{builderid_or_buildername}/workers/{workerid} (method=pause)
Body keys:
  • method (string) – must be pause

  • reason (string) – The reason why the worker was paused

POST with method: /builders/{builderid_or_buildername}/workers/{workerid} (method=unpause)
Body keys:
  • method (string) – must be unpause

  • reason (string) – The reason why the worker was un-paused

path: /masters/{masterid}/builders/{builderid}/workers
Path Keys:
  • masterid (number) – the id of the master

  • builderid (number) – the id of the builder

This path selects all workers for a given builder and a given master

GET
returns

collection of worker

path: /masters/{masterid}/builders/{builderid}/workers/{name}
Path Keys:
  • masterid (number) – the id of the master

  • builderid (number) – the id of the builder

  • name (identifier) – the name of the worker

This path selects one worker by name for a given builder and a given master

GET
returns

collection of worker

path: /masters/{masterid}/builders/{builderid}/workers/{workerid}
Path Keys:
  • masterid (number) – the id of the master

  • builderid (number) – the id of the builder

  • workerid (number) – the id of the worker

This path selects one worker by name for a given builder and a given master

GET
returns

collection of worker

path: /masters/{masterid}/workers
Path Keys:

masterid (number) – the id of the master

This path selects all workers for a given master

GET
returns

collection of worker

path: /masters/{masterid}/workers/{name}
Path Keys:
  • masterid (number) – the id of the master

  • name (identifier) – the name of the worker

This path selects one worker by name for a given master

GET
returns

collection of worker

path: /masters/{masterid}/workers/{workerid}
Path Keys:
  • masterid (number) – the id of the master

  • workerid (number) – the id of the worker

This path selects one worker by id for a given master

GET
returns

collection of worker

path: /workers

This path selects all workers

GET
returns

collection of worker

path: /workers/{name_or_id}
Path Keys:

name_or_id (number|identifier) – the name or id of a worker

This path selects a worker by name or id

GET
returns

collection of worker

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文