internal static void AddLanguageWorkerChannelErrors(IFunctionDispatcher functionDispatcher, IDictionary <string, ICollection <string> > functionErrors)
 {
     foreach (KeyValuePair <WorkerConfig, LanguageWorkerState> kvp in functionDispatcher.LanguageWorkerChannelStates)
     {
         WorkerConfig        workerConfig = kvp.Key;
         LanguageWorkerState workerState  = kvp.Value;
         foreach (var functionRegistrationContext in workerState.GetRegistrations())
         {
             var exMessage = $"Failed to start language worker process for: {workerConfig.Language}";
             var languageWorkerChannelException = workerState.Errors != null && workerState.Errors.Count > 0 ? new LanguageWorkerChannelException(exMessage, workerState.Errors[workerState.Errors.Count - 1]) : new LanguageWorkerChannelException(exMessage);
             Utility.AddFunctionError(functionErrors, functionRegistrationContext.Metadata.Name, Utility.FlattenException(languageWorkerChannelException, includeSource: false));
         }
     }
 }
Beispiel #2
0
 public FunctionDispatcherEndToEndTests(TestFixture fixture)
 {
     Fixture       = fixture;
     _channelState = Fixture.JobHost.FunctionDispatcher.WorkerState;
 }