Skip to main content

Class: WorkerHeartbeat

Worker info message, contains information about the worker and its current state. All information is provided by the worker itself. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: Removing those words make names less clear. --)

Properties​

activityPollerInfo?​

optional activityPollerInfo?: $Properties | null

WorkerHeartbeat activityPollerInfo.


activityTaskSlotsInfo?​

optional activityTaskSlotsInfo?: $Properties | null

WorkerHeartbeat activityTaskSlotsInfo.


currentStickyCacheSize​

currentStickyCacheSize: number

Current cache size, expressed in number of Workflow Executions.


deploymentVersion?​

optional deploymentVersion?: $Properties | null

WorkerHeartbeat deploymentVersion.


drivers​

drivers: $Properties[]

Storage drivers in use by this SDK.


elapsedSinceLastHeartbeat?​

optional elapsedSinceLastHeartbeat?: $Properties | null

Elapsed time since the last heartbeat from the worker.


environment?​

optional environment?: $Properties | null

Information about the environment this SDK is running in.


heartbeatTime?​

optional heartbeatTime?: $Properties | null

Timestamp of this heartbeat, coming from the worker. Worker should set it to "now". Note that this timestamp comes directly from the worker and is subject to workers' clock skew.


hostInfo?​

optional hostInfo?: $Properties | null

Worker host information.


localActivitySlotsInfo?​

optional localActivitySlotsInfo?: $Properties | null

WorkerHeartbeat localActivitySlotsInfo.


nexusPollerInfo?​

optional nexusPollerInfo?: $Properties | null

WorkerHeartbeat nexusPollerInfo.


nexusTaskSlotsInfo?​

optional nexusTaskSlotsInfo?: $Properties | null

WorkerHeartbeat nexusTaskSlotsInfo.


plugins​

plugins: $Properties[]

Plugins currently in use by this SDK.


sdkName​

sdkName: string

WorkerHeartbeat sdkName.


sdkVersion​

sdkVersion: string

WorkerHeartbeat sdkVersion.


startTime?​

optional startTime?: $Properties | null

Worker start time. It can be used to determine worker uptime. (current time - start time)


status​

status: WorkerStatus

Worker status. Defined by SDK.


taskQueue​

taskQueue: string

Task queue this worker is polling for tasks.


totalStickyCacheHit​

totalStickyCacheHit: number

A Workflow Task found a cached Workflow Execution to run against.


totalStickyCacheMiss​

totalStickyCacheMiss: number

A Workflow Task did not find a cached Workflow execution to run against.


workerIdentity​

workerIdentity: string

Worker identity, set by the client, may not be unique. Usually host_name+(user group name)+process_id, but can be overwritten by the user.


workerInstanceKey​

workerInstanceKey: string

Worker identifier, should be unique for the namespace. It is distinct from worker identity, which is not necessarily namespace-unique.


workflowPollerInfo?​

optional workflowPollerInfo?: $Properties | null

WorkerHeartbeat workflowPollerInfo.


workflowStickyPollerInfo?​

optional workflowStickyPollerInfo?: $Properties | null

WorkerHeartbeat workflowStickyPollerInfo.


workflowTaskSlotsInfo?​

optional workflowTaskSlotsInfo?: $Properties | null

WorkerHeartbeat workflowTaskSlotsInfo.

Methods​

toJSON()​

toJSON(): object

Converts this WorkerHeartbeat to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): WorkerHeartbeat & $Shape

Creates a new WorkerHeartbeat instance using the specified properties.

Parameters​
properties?​

$Shape

Properties to set

Returns​

WorkerHeartbeat & $Shape

WorkerHeartbeat instance

Call Signature​

static create(properties?): WorkerHeartbeat

Creates a new WorkerHeartbeat instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

WorkerHeartbeat

WorkerHeartbeat instance


decode()​

static decode(reader, length?): WorkerHeartbeat & $Shape

Decodes a WorkerHeartbeat message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

WorkerHeartbeat & $Shape

WorkerHeartbeat

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): WorkerHeartbeat & $Shape

Decodes a WorkerHeartbeat message from the specified reader or buffer, length delimited.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

WorkerHeartbeat & $Shape

WorkerHeartbeat

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified WorkerHeartbeat message. Does not implicitly temporal.api.worker.v1.WorkerHeartbeat.verify|verify messages.

Parameters​

message​

$Properties

WorkerHeartbeat message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified WorkerHeartbeat message, length delimited. Does not implicitly temporal.api.worker.v1.WorkerHeartbeat.verify|verify messages.

Parameters​

message​

$Properties

WorkerHeartbeat message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): WorkerHeartbeat

Creates a WorkerHeartbeat message from a plain object. Also converts values to their respective internal types.

Parameters​

object​

Plain object

Returns​

WorkerHeartbeat

WorkerHeartbeat


toObject()​

static toObject(message, options?): object

Creates a plain object from a WorkerHeartbeat message. Also converts values to other types if specified.

Parameters​

message​

WorkerHeartbeat

WorkerHeartbeat

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object