Skip to content

Commit

Permalink
Eager workflow start (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
cretz authored Mar 1, 2024
1 parent c703da9 commit e99bcb0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Temporalio/Client/TemporalClient.Workflow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ private async Task<WorkflowHandle<TWorkflow, TResult>> StartWorkflowInternalAsyn
RequestId = Guid.NewGuid().ToString(),
WorkflowIdReusePolicy = input.Options.IdReusePolicy,
RetryPolicy = input.Options.RetryPolicy?.ToProto(),
RequestEagerExecution = input.Options.RequestEagerStart,
};
if (input.Args.Count > 0)
{
Expand Down
8 changes: 8 additions & 0 deletions src/Temporalio/Client/WorkflowOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ public WorkflowOptions(string id, string taskQueue)
/// </summary>
public IReadOnlyCollection<object?>? StartSignalArgs { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the workflow will request eager start. This
/// potentially reduces the latency to start the workflow by encouraging the server to
/// start it on a local worker running this same client.
/// </summary>
/// <remarks>WARNING: Eager workflow start is experimental.</remarks>
public bool RequestEagerStart { get; set; }

/// <summary>
/// Gets or sets RPC options for starting the workflow.
/// </summary>
Expand Down

0 comments on commit e99bcb0

Please sign in to comment.