Ruby SDKFeature Clients

Workers Client

Workers client for managing workers programmatically within Hatchet.

This class provides a high-level interface for retrieving, listing, and updating workers in the Hatchet system.

worker = hatchet.workers.get("worker-id")
workers = hatchet.workers.list

It is available on the main client as hatchet.workers.

Methods:

NameDescription
getGet a worker by its ID.
listList all workers in the tenant.
updateUpdate a worker by its ID.

Functions

get

Get a worker by its ID.

worker = hatchet.workers.get("worker-123")

Parameters:

NameTypeDescriptionDefault
worker_idStringThe ID of the worker to retrieve.required

Returns:

TypeDescription
ObjectThe worker details.

Raises:

TypeDescription
HatchetSdkRest::ApiErrorIf the API request fails.

list

List all workers in the tenant.

workers = hatchet.workers.list

Returns:

TypeDescription
ObjectA list of workers.

Raises:

TypeDescription
HatchetSdkRest::ApiErrorIf the API request fails.

update

Update a worker by its ID.

updated = hatchet.workers.update("worker-123", { is_paused: true })

Parameters:

NameTypeDescriptionDefault
worker_idStringThe ID of the worker to update.required
optsHashThe update options.required

Returns:

TypeDescription
ObjectThe updated worker.

Raises:

TypeDescription
HatchetSdkRest::ApiErrorIf the API request fails.

Last updated on August 24, 2026

On this page