TaskSet Class

Represents a list of some pending action.

Similar to a native JavaScript promise in that it acts as a placeholder for outstanding asynchronous work, but has a synchronous implementation and is specific to Durable Functions.

Tasks are only returned to an orchestration function when a [[DurableOrchestrationContext]] operation is not called with yield. They are useful for parallelization and timeout operations in conjunction with Task.all and Task.any.

Inheritance
builtins.object
TaskSet

Constructor

TaskSet(is_completed, actions, result, is_faulted=False, timestamp=None, exception=None, is_played=False)

Parameters

Name Description
is_completed
Required
actions
Required
result
Required
is_faulted
default value: False
timestamp
default value: None
exception
default value: None
is_played
default value: False

Attributes

actions

Get the scheduled action represented by the task.

Internal use only.

exception

Get the error thrown when attempting to perform the task's action.

If the Task has not yet completed or has completed successfully, None

is_completed

Get indicator whether the task has completed.

Note that completion is not equivalent to success.

is_faulted

Get indicator whether the task faulted in some way due to error.

result

Get the result of the task, if completed. Otherwise None.

timestamp

Get the timestamp of the task.