Skip to main content

Class: TaskQueueClient

client.TaskQueueClient

Client for starting Workflow executions and creating Workflow handles

Hierarchy

  • BaseClient

    TaskQueueClient

Constructors

constructor

new TaskQueueClient(options?): TaskQueueClient

Parameters

NameType
options?BaseClientOptions

Returns

TaskQueueClient

Overrides

BaseClient.constructor

Properties

connection

Readonly connection: ConnectionLike

Inherited from

BaseClient.connection


options

Readonly options: LoadedTaskQueueClientOptions

Accessors

workflowService

get workflowService(): WorkflowService

Raw gRPC access to the Temporal service.

NOTE: The namespace provided in options is not automatically set on requests using this service attribute.

Returns

WorkflowService

Methods

getBuildIdCompatability

getBuildIdCompatability(taskQueue): Promise<undefined | WorkerBuildIdVersionSets>

Fetch the sets of compatible Build Ids for a given task queue.

Parameters

NameTypeDescription
taskQueuestringThe task queue to fetch the compatibility information for.

Returns

Promise<undefined | WorkerBuildIdVersionSets>

The sets of compatible Build Ids for the given task queue, or undefined if the queue has no Build Ids defined on it.


getReachability

getReachability(options): Promise<ReachabilityResponse>

Fetches task reachability to determine whether a worker may be retired. The request may specify task queues to query for or let the server fetch all task queues mapped to the given build IDs.

When requesting a large number of task queues or all task queues associated with the given build ids in a namespace, all task queues will be listed in the response but some of them may not contain reachability information due to a server enforced limit. When reaching the limit, task queues that reachability information could not be retrieved for will be marked with a NotFetched entry in BuildIdReachability.taskQueueReachability. The caller may issue another call to get the reachability for those task queues.

Parameters

NameType
optionsReachabilityOptions

Returns

Promise<ReachabilityResponse>


updateBuildIdCompatibility

updateBuildIdCompatibility(taskQueue, operation): Promise<void>

Used to add new Build Ids or otherwise update the relative compatibility of Build Ids as defined on a specific task queue for the Worker Versioning feature. For more on this feature, see https://docs.temporal.io/workers#worker-versioning

Parameters

NameTypeDescription
taskQueuestringThe task queue to make changes to.
operationBuildIdOperationThe operation to be performed.

Returns

Promise<void>


withAbortSignal

withAbortSignal<R>(abortSignal, fn): Promise<R>

Set an AbortSignal that, when aborted, cancels any ongoing service requests executed in fn's scope.

Type parameters

Name
R

Parameters

NameType
abortSignalAbortSignal
fn() => Promise<R>

Returns

Promise<R>

value returned from fn

See

Connection.withAbortSignal

Inherited from

BaseClient.withAbortSignal


withDeadline

withDeadline<R>(deadline, fn): Promise<R>

Set the deadline for any service requests executed in fn's scope.

Type parameters

Name
R

Parameters

NameType
deadlinenumber | Date
fn() => Promise<R>

Returns

Promise<R>

Inherited from

BaseClient.withDeadline


withMetadata

withMetadata<R>(metadata, fn): Promise<R>

Set metadata for any service requests executed in fn's scope.

Type parameters

Name
R

Parameters

NameType
metadataMetadata
fn() => Promise<R>

Returns

Promise<R>

returned value of fn

See

Connection.withMetadata

Inherited from

BaseClient.withMetadata