Options for a task that can be run using a durable executor. A task is resilient to task
failures, process failures, network connectivity issues, and other transient errors. The task
should be idempotent as it may be run multiple times if there is a process failure or if the
task is retried.
When enqueued with an executor, a task execution handle is returned. It supports getting the
execution status, waiting for the task to complete, and cancelling the task.
The output of the run function is the output of the task.
The input and output are serialized and deserialized using the serializer passed to the durable
executor.
Make sure the id is unique among all the tasks in the same durable executor. If two tasks are
registered with the same id, an error will be thrown.
Options for a task that can be run using a durable executor. A task is resilient to task failures, process failures, network connectivity issues, and other transient errors. The task should be idempotent as it may be run multiple times if there is a process failure or if the task is retried.
When enqueued with an executor, a task execution handle is returned. It supports getting the execution status, waiting for the task to complete, and cancelling the task.
The output of the
run
function is the output of the task.The input and output are serialized and deserialized using the serializer passed to the durable executor.
Make sure the id is unique among all the tasks in the same durable executor. If two tasks are registered with the same id, an error will be thrown.
The tasks can be added to an executor using the DurableExecutor.task method. If the input to a task needs to be validated, it can be done using the DurableExecutor.validateInput or DurableExecutor.inputSchema methods.
See the task examples section for more details on creating tasks.