Skip to main content

Class: TimeSkippingConfig

The configuration for time skipping of an execution. When time skipping is enabled, virtual time advances automatically whenever there is no in-flight work. Options like fast_forward, disable_propagation, and max_session_skip_count are provided for granular control of the execution's time skipping behavior. See each field's comment for a detailed explanation.

An example of workflows with time skipping: For workflows, an execution is a chain of runs including retries, cron, and continue-as-new. In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations, etc. User timers are not classified as in-flight work and will be skipped over; the virtual clock may also skip to the time point of the registered fast-forward when there is no in-flight work. Whenever time is skipped, the skip count is incremented by one; max_session_skip_count bounds the number of skips allowed within a single time-skipping session. For child workflows, by default, if the parent execution is skipping time, the child execution will also skip time, but a parent's fast_forward won't affect its child's execution. A flag is provided to disable propagation of the "enabled" flag to child workflows; regardless of that flag, a child workflow inherits the virtual time from the parent execution as its start time.

Properties​

disablePropagation​

disablePropagation: boolean

By default, executions started by another execution (e.g. a child workflow of a parent workflow or a schedule with the time-skipping policy enabled) inherit the "enabled" flag and skip time when possible. This flag disables that inheritance.


enabled​

enabled: boolean

Enables or disables time skipping for this workflow execution.


fastForwardConfig?​

optional fastForwardConfig?: $Properties | null

An optional opt-in to control time-skipping behavior through fast-forward; see its definition for details.


maxSessionSkipCount​

maxSessionSkipCount: number

The maximum number of skips allowed every time this field is updated. It protects the execution from situations like unlimited retries when backoff is skipped.

Every time the execution skips time, the skip count is incremented by one, and when it reaches max_session_skip_count, time skipping stops. Whenever this config field is updated, the accumulated skip count is cleared, marking the start of a new session. For an execution with a chain of runs (retry, cron, continue-as-new), the count is accumulated across all runs within the same session.

If this field is not set, the server applies a large default value (e.g. 100). The default can be changed through dynamic config, and is overridden by this field when set.

Methods​

toJSON()​

toJSON(): object

Converts this TimeSkippingConfig to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): TimeSkippingConfig & $Properties

Creates a new TimeSkippingConfig instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

TimeSkippingConfig & $Properties

TimeSkippingConfig instance

Call Signature​

static create(properties?): TimeSkippingConfig

Creates a new TimeSkippingConfig instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

TimeSkippingConfig

TimeSkippingConfig instance


decode()​

static decode(reader, length?): TimeSkippingConfig & $Properties

Decodes a TimeSkippingConfig 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​

TimeSkippingConfig & $Properties

TimeSkippingConfig

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): TimeSkippingConfig & $Properties

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

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

TimeSkippingConfig & $Properties

TimeSkippingConfig

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 TimeSkippingConfig message. Does not implicitly temporal.api.common.v1.TimeSkippingConfig.verify|verify messages.

Parameters​

message​

$Properties

TimeSkippingConfig message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

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

Parameters​

message​

$Properties

TimeSkippingConfig message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): TimeSkippingConfig

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

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

TimeSkippingConfig

TimeSkippingConfig


toObject()​

static toObject(message, options?): object

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

Parameters​

message​

TimeSkippingConfig

TimeSkippingConfig

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object