Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aishwaryabh committed Jan 18, 2024
1 parent bd935ff commit aa75a5c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -456,14 +456,11 @@ void IExtensionConfigProvider.Initialize(ExtensionConfigContext context)
"For more information on extension bundles, see https://docs.microsoft.com/azure/azure-functions/functions-bindings-register#extension-bundles.");
#endif
}
else
{
// This is the older middleware implementation that is currently in use for in-process .NET
// and the older out-of-proc languages, like Node.js, Python, and PowerShell.
this.taskHubWorker.AddActivityDispatcherMiddleware(this.ActivityMiddleware);
this.taskHubWorker.AddOrchestrationDispatcherMiddleware(this.EntityMiddleware);
this.taskHubWorker.AddOrchestrationDispatcherMiddleware(this.OrchestrationMiddleware);
}

// The RPC server needs to be started sometime before any functions can be triggered
// and this is the latest point in the pipeline available to us.
Expand Down
29 changes: 29 additions & 0 deletions src/WebJobs.Extensions.DurableTask/OutOfProcMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,35 @@ public async Task CallEntityAsync(DispatchMiddlewareContext dispatchContext, Fun
FunctionName functionName = new FunctionName(entityId.EntityName);
RegisteredFunctionInfo functionInfo = this.extension.GetEntityInfo(functionName);

if (entityId.EntityName?.StartsWith("openai::", StringComparison.OrdinalIgnoreCase) ?? false)
{
try
{
await next();
}
catch (Exception hostRuntimeException)
{
try
{
await next();
}
catch (Exception hostRuntimeException2)
{
try
{
await next();
}
catch (Exception hostRuntimeException3)
{
var lol = hostRuntimeException3;
}

}
}

return;
}

void SetErrorResult(FailureDetails failureDetails)
{
// Returns a result with no operation results and no state change,
Expand Down

0 comments on commit aa75a5c

Please sign in to comment.