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.
Implements
Constructors
constructor
• new TimeSkippingConfig(properties?): TimeSkippingConfig
Constructs a new TimeSkippingConfig.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | ITimeSkippingConfig | Properties to set |
Returns
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.
Implementation of
ITimeSkippingConfig.disablePropagation
enabled
• enabled: boolean
Enables or disables time skipping for this workflow execution.
Implementation of
fastForwardConfig
• Optional fastForwardConfig: null | IFastForwardConfig
An optional opt-in to control time-skipping behavior through fast-forward; see its definition for details.
Implementation of
ITimeSkippingConfig.fastForwardConfig
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.
Implementation of
ITimeSkippingConfig.maxSessionSkipCount
Methods
toJSON
▸ toJSON(): Object
Converts this TimeSkippingConfig to JSON.
Returns
Object
JSON object
create
▸ create(properties?): TimeSkippingConfig
Creates a new TimeSkippingConfig instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | ITimeSkippingConfig | Properties to set |
Returns
TimeSkippingConfig instance
decode
▸ decode(reader, length?): TimeSkippingConfig
Decodes a TimeSkippingConfig message from the specified reader or buffer.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
TimeSkippingConfig
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader): TimeSkippingConfig
Decodes a TimeSkippingConfig message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
TimeSkippingConfig
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 TimeSkippingConfig message. Does not implicitly temporal.api.common.v1.TimeSkippingConfig.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | ITimeSkippingConfig | TimeSkippingConfig message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message, writer?): Writer
Encodes the specified TimeSkippingConfig message, length delimited. Does not implicitly temporal.api.common.v1.TimeSkippingConfig.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | ITimeSkippingConfig | TimeSkippingConfig message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object): TimeSkippingConfig
Creates a TimeSkippingConfig message from a plain object. Also converts values to their respective internal types.
Parameters
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
TimeSkippingConfig
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?): string
Gets the default type url for TimeSkippingConfig
Parameters
| Name | Type | Description |
|---|---|---|
typeUrlPrefix? | string | your custom typeUrlPrefix(default "type.googleapis.com") |
Returns
string
The default type url
toObject
▸ toObject(message, options?): Object
Creates a plain object from a TimeSkippingConfig message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | TimeSkippingConfig | TimeSkippingConfig |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object