Workers Client
Bases: BaseRestClient
The workers client is a client for managing workers programmatically within Hatchet.
Methods:
| Name | Description |
|---|---|
aio_get | Get a worker by its ID. |
aio_list | List all workers in the tenant determined by the client config. |
aio_pause | Pause a worker by its ID. |
aio_unpause | Unpause a worker by its ID. |
aio_update | Update a worker by its ID. |
get | Get a worker by its ID. |
list | List all workers in the tenant determined by the client config. |
pause | Pause a worker by its ID. |
unpause | Unpause a worker by its ID. |
update | Update a worker by its ID. |
Functions
aio_get
Get a worker by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
worker_id | str | The ID of the worker to retrieve. | required |
Returns:
| Type | Description |
|---|---|
Worker | The worker. |
aio_list
List all workers in the tenant determined by the client config.
Returns:
| Type | Description |
|---|---|
WorkerList | A list of workers. |
aio_pause
Pause a worker by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
worker_id | str | The ID of the worker to pause. | required |
Returns:
| Type | Description |
|---|---|
Worker | The paused worker. |
aio_unpause
Unpause a worker by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
worker_id | str | The ID of the worker to unpause. | required |
Returns:
| Type | Description |
|---|---|
Worker | The unpaused worker. |
aio_update
Update a worker by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
worker_id | str | The ID of the worker to update. | required |
opts | UpdateWorkerRequest | The update options. | required |
Returns:
| Type | Description |
|---|---|
Worker | The updated worker. |
get
Get a worker by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
worker_id | str | The ID of the worker to retrieve. | required |
Returns:
| Type | Description |
|---|---|
Worker | The worker. |
list
List all workers in the tenant determined by the client config.
Returns:
| Type | Description |
|---|---|
WorkerList | A list of workers. |
pause
Pause a worker by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
worker_id | str | The ID of the worker to pause. | required |
Returns:
| Type | Description |
|---|---|
Worker | The paused worker. |
unpause
Unpause a worker by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
worker_id | str | The ID of the worker to unpause. | required |
Returns:
| Type | Description |
|---|---|
Worker | The unpaused worker. |
update
Update a worker by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
worker_id | str | The ID of the worker to update. | required |
opts | UpdateWorkerRequest | The update options. | required |
Returns:
| Type | Description |
|---|---|
Worker | The updated worker. |
Last updated on September 1, 2026