Skip to content

Commit 34e06ec

Browse files
committed
PR Feedback
1 parent c739811 commit 34e06ec

File tree

6 files changed

+4
-10
lines changed

6 files changed

+4
-10
lines changed

src/DotNetWorker.Grpc/Definition/GrpcFunctionDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public GrpcFunctionDefinition(FunctionLoadRequest loadRequest, IMethodInfoLocato
2121
Name = loadRequest.Metadata.Name;
2222
Id = loadRequest.FunctionId;
2323

24-
string? scriptRoot = Environment.GetEnvironmentVariable("AzureWebJobsScriptRoot")!;
24+
string? scriptRoot = Environment.GetEnvironmentVariable("AzureWebJobsScriptRoot");
2525
if (string.IsNullOrWhiteSpace(scriptRoot))
2626
{
2727
throw new ArgumentException("AzureWebJobsScriptRoot env variable value is null or empty");

src/DotNetWorker.Grpc/DotNetWorker.Grpc.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
Grpc.Net.Client implementation-->
4141
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
4242
<PackageReference Include="Grpc.Core" Version="2.45.0" />
43-
<Compile Remove="NativeHostIntegration/./*.*" />
43+
<Compile Remove="NativeHostIntegration/**" />
4444
</ItemGroup>
4545

4646
<ItemGroup>

src/DotNetWorker.Grpc/GrpcServiceCollectionExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System;
55
using System.Threading.Channels;
6-
using Microsoft.Azure.Functions.Core;
76
using Microsoft.Azure.Functions.Worker;
87
using Microsoft.Azure.Functions.Worker.Core.FunctionMetadata;
98
using Microsoft.Azure.Functions.Worker.Grpc.Messages;

src/DotNetWorker.Grpc/GrpcWorker.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
using System.Linq;
66
using System.Runtime.InteropServices;
77
using System.Threading;
8-
using System.Threading.Channels;
98
using System.Threading.Tasks;
109
using Azure.Core.Serialization;
11-
using Grpc.Core;
1210
using Microsoft.Azure.Functions.Worker.Context.Features;
1311
using Microsoft.Azure.Functions.Worker.Core.FunctionMetadata;
1412
using Microsoft.Azure.Functions.Worker.Grpc;
@@ -21,7 +19,6 @@
2119
using Microsoft.Extensions.Hosting;
2220
using Microsoft.Extensions.Logging;
2321
using Microsoft.Extensions.Options;
24-
using static Microsoft.Azure.Functions.Worker.Grpc.Messages.FunctionRpc;
2522
using MsgType = Microsoft.Azure.Functions.Worker.Grpc.Messages.StreamingMessage.ContentOneofCase;
2623

2724
namespace Microsoft.Azure.Functions.Worker
@@ -78,7 +75,7 @@ public async Task StartAsync(CancellationToken token)
7875
Task IMessageProcessor.ProcessMessageAsync(StreamingMessage message)
7976
{
8077
// Dispatch and return.
81-
Task.Run(() => ProcessRequestCoreAsync(message));
78+
_ = ProcessRequestCoreAsync(message);
8279

8380
return Task.CompletedTask;
8481
}

src/DotNetWorker.Grpc/GrpcWorkerClientFactory.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ public Task<IWorkerClient> StartClientAsync(IMessageProcessor messageProcessor,
3535
private class GrpcWorkerClient : IWorkerClient
3636
{
3737
private readonly FunctionRpcClient _grpcClient;
38-
private readonly GrpcHostChannel _outputChannel;
3938
private readonly GrpcWorkerStartupOptions _startupOptions;
4039
private readonly ChannelReader<StreamingMessage> _outputReader;
4140
private readonly ChannelWriter<StreamingMessage> _outputWriter;
@@ -44,7 +43,6 @@ private class GrpcWorkerClient : IWorkerClient
4443

4544
public GrpcWorkerClient(GrpcHostChannel outputChannel, GrpcWorkerStartupOptions startupOptions)
4645
{
47-
_outputChannel = outputChannel ?? throw new ArgumentNullException(nameof(outputChannel));
4846
_startupOptions = startupOptions ?? throw new ArgumentNullException(nameof(startupOptions));
4947

5048
_outputReader = outputChannel.Channel.Reader;

src/DotNetWorker.Grpc/NativeHostIntegration/NativeMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.Azure.Functions.Worker.Grpc.NativeHostIntegration
1010
{
1111
internal static unsafe partial class NativeMethods
1212
{
13-
internal const string NativeWorkerDll = "FunctionsNetHost.exe";
13+
private const string NativeWorkerDll = "FunctionsNetHost.exe";
1414

1515
public static NativeHost GetNativeHostData()
1616
{

0 commit comments

Comments
 (0)