Skip to content

Commit 7f3fc0a

Browse files
fix configuration
1 parent d2400cd commit 7f3fc0a

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

src/Client/AzureManaged/DurableTaskSchedulerClientExtensions.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,15 @@ static void ConfigureSchedulerOptions(
8585
.Configure(additionalConfig ?? (_ => { }))
8686
.ValidateDataAnnotations();
8787

88+
builder.Services.AddOptions<DurableTaskClientOptions>(builder.Name)
89+
.Configure(options =>
90+
{
91+
options.EnableEntitySupport = true;
92+
});
93+
8894
builder.Services.TryAddEnumerable(
8995
ServiceDescriptor.Singleton<IConfigureOptions<GrpcDurableTaskClientOptions>, ConfigureGrpcChannel>());
90-
builder.UseGrpc((GrpcDurableTaskClientOptions options) =>
91-
{
92-
options.EnableEntitySupport = true;
93-
});
96+
builder.UseGrpc(_ => { });
9497
}
9598

9699
/// <summary>

src/Worker/AzureManaged/DurableTaskSchedulerWorkerExtensions.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,15 @@ static void ConfigureSchedulerOptions(
8585
.Configure(additionalConfig ?? (_ => { }))
8686
.ValidateDataAnnotations();
8787

88+
builder.Services.AddOptions<DurableTaskWorkerOptions>(builder.Name)
89+
.Configure(options =>
90+
{
91+
options.EnableEntitySupport = true;
92+
});
93+
8894
builder.Services.TryAddEnumerable(
8995
ServiceDescriptor.Singleton<IConfigureOptions<GrpcDurableTaskWorkerOptions>, ConfigureGrpcChannel>());
90-
builder.UseGrpc((GrpcDurableTaskWorkerOptions options) =>
91-
{
92-
options.EnableEntitySupport = true;
93-
options.ConvertOrchestrationEntityEvents = true;
94-
});
96+
builder.UseGrpc(_ => { });
9597
}
9698

9799
/// <summary>
@@ -117,6 +119,9 @@ public void Configure(string? name, GrpcDurableTaskWorkerOptions options)
117119
{
118120
DurableTaskSchedulerWorkerOptions source = schedulerOptions.Get(name ?? Options.DefaultName);
119121
options.Channel = source.CreateChannel();
122+
123+
options.ConvertOrchestrationEntityEvents = true;
124+
options.InsertEntityUnlocksOnCompletion = true;
120125
}
121126
}
122127
}

0 commit comments

Comments
 (0)