Skip to main content

Class: WorkerSlotsInfo

worker.v1.WorkerSlotsInfo

Represents a WorkerSlotsInfo.

Properties

currentAvailableSlots

currentAvailableSlots: number

Number of slots available for the worker to specific tasks. May be -1 if the upper bound is not known.


currentUsedSlots

currentUsedSlots: number

Number of slots used by the worker for specific tasks.


lastIntervalFailureTasks

lastIntervalFailureTasks: number

Number of failed tasks processed since the last heartbeat from the worker.


lastIntervalProcessedTasks

lastIntervalProcessedTasks: number

Number of tasks processed in since the last heartbeat from the worker. This is a cumulative counter, and it is reset to 0 each time the worker sends a heartbeat. Contains both successful and failed tasks.


slotSupplierKind

slotSupplierKind: string

Kind of the slot supplier, which is used to determine how the slots are allocated. Possible values: "Fixed | ResourceBased | Custom String"


totalFailedTasks

totalFailedTasks: number

Total number of failed tasks processed by the worker so far.


totalProcessedTasks

totalProcessedTasks: number

Total number of tasks processed (completed both successfully and unsuccesfully, or any other way) by the worker since the worker started. This is a cumulative counter.

Methods

toJSON

toJSON(): Object

Converts this WorkerSlotsInfo to JSON.

Returns

Object

JSON object


create

create(properties?): WorkerSlotsInfo & $Properties

Creates a new WorkerSlotsInfo instance using the specified properties.

Parameters

NameTypeDescription
properties?$PropertiesProperties to set

Returns

WorkerSlotsInfo & $Properties

WorkerSlotsInfo instance

create(properties?): WorkerSlotsInfo

Parameters

NameType
properties?$Properties

Returns

WorkerSlotsInfo


decode

decode(reader, length?): WorkerSlotsInfo & $Properties

Decodes a WorkerSlotsInfo message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

WorkerSlotsInfo & $Properties

WorkerSlotsInfo

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): WorkerSlotsInfo & $Properties

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

WorkerSlotsInfo & $Properties

WorkerSlotsInfo

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

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

Parameters

NameTypeDescription
message$PropertiesWorkerSlotsInfo message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

NameTypeDescription
message$PropertiesWorkerSlotsInfo message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): WorkerSlotsInfo

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

WorkerSlotsInfo

WorkerSlotsInfo


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageWorkerSlotsInfoWorkerSlotsInfo
options?IConversionOptionsConversion options

Returns

Object

Plain object