Skip to content

Commit

Permalink
fix configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianburckhardt committed Jan 29, 2025
1 parent d2400cd commit 7f3fc0a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
11 changes: 7 additions & 4 deletions src/Client/AzureManaged/DurableTaskSchedulerClientExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,15 @@ static void ConfigureSchedulerOptions(
.Configure(additionalConfig ?? (_ => { }))
.ValidateDataAnnotations();

builder.Services.AddOptions<DurableTaskClientOptions>(builder.Name)
.Configure(options =>
{
options.EnableEntitySupport = true;
});

builder.Services.TryAddEnumerable(
ServiceDescriptor.Singleton<IConfigureOptions<GrpcDurableTaskClientOptions>, ConfigureGrpcChannel>());
builder.UseGrpc((GrpcDurableTaskClientOptions options) =>
{
options.EnableEntitySupport = true;
});
builder.UseGrpc(_ => { });
}

/// <summary>
Expand Down
15 changes: 10 additions & 5 deletions src/Worker/AzureManaged/DurableTaskSchedulerWorkerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,15 @@ static void ConfigureSchedulerOptions(
.Configure(additionalConfig ?? (_ => { }))
.ValidateDataAnnotations();

builder.Services.AddOptions<DurableTaskWorkerOptions>(builder.Name)
.Configure(options =>
{
options.EnableEntitySupport = true;
});

builder.Services.TryAddEnumerable(
ServiceDescriptor.Singleton<IConfigureOptions<GrpcDurableTaskWorkerOptions>, ConfigureGrpcChannel>());
builder.UseGrpc((GrpcDurableTaskWorkerOptions options) =>
{
options.EnableEntitySupport = true;
options.ConvertOrchestrationEntityEvents = true;
});
builder.UseGrpc(_ => { });
}

/// <summary>
Expand All @@ -117,6 +119,9 @@ public void Configure(string? name, GrpcDurableTaskWorkerOptions options)
{
DurableTaskSchedulerWorkerOptions source = schedulerOptions.Get(name ?? Options.DefaultName);
options.Channel = source.CreateChannel();

options.ConvertOrchestrationEntityEvents = true;
options.InsertEntityUnlocksOnCompletion = true;
}
}
}

0 comments on commit 7f3fc0a

Please sign in to comment.