in src/RequestProcessor.cs [324:355]
private void ProcessInvocationRequestImpl(
StreamingMessage request,
AzFunctionInfo functionInfo,
PowerShellManager psManager,
FunctionInvocationPerformanceStopwatch stopwatch)
{
InvocationRequest invocationRequest = request.InvocationRequest;
StreamingMessage response = NewStreamingMessageTemplate(
request.RequestId,
StreamingMessage.ContentOneofCase.InvocationResponse,
out StatusResult status);
response.InvocationResponse.InvocationId = invocationRequest.InvocationId;
try
{
// Invoke the function and return a hashtable of out binding data
Hashtable results = InvokeFunction(functionInfo, psManager, stopwatch, invocationRequest);
BindOutputFromResult(response.InvocationResponse, functionInfo, results);
}
catch (Exception e)
{
status.Status = StatusResult.Types.Status.Failure;
status.Exception = e.ToRpcException();
}
finally
{
_powershellPool.ReclaimUsedWorker(psManager);
}
_msgStream.Write(response);
}