File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/WebJobs.Script/Workers/Rpc/FunctionRegistration Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -117,13 +117,13 @@ private async Task<int> GetMaxProcessCount()
117
117
return MultiLanguageDefaultProcessCount ;
118
118
}
119
119
120
- if ( _workerConcurrencyOptions != null && ! string . IsNullOrEmpty ( _workerRuntime ) )
120
+ if ( ! string . IsNullOrEmpty ( _workerRuntime ) )
121
121
{
122
122
var workerConfig = _workerConfigs . Where ( c => c . Description . Language . Equals ( _workerRuntime , StringComparison . InvariantCultureIgnoreCase ) )
123
- . FirstOrDefault ( ) ;
123
+ . FirstOrDefault ( ) ;
124
124
if ( workerConfig != null )
125
125
{
126
- return _environment . IsWorkerDynamicConcurrencyEnabled ( ) ? _workerConcurrencyOptions . Value . MaxWorkerCount : workerConfig . CountOptions . ProcessCount ;
126
+ return workerConfig . CountOptions . ProcessCount ;
127
127
}
128
128
}
129
129
@@ -490,7 +490,7 @@ internal async Task<IEnumerable<IRpcWorkerChannel>> GetInitializedWorkerChannels
490
490
IEnumerable < IRpcWorkerChannel > workerChannels = await GetAllWorkerChannelsAsync ( language ) ;
491
491
IEnumerable < IRpcWorkerChannel > initializedWorkers = workerChannels . Where ( ch => ch . IsChannelReadyForInvocations ( ) ) ;
492
492
493
- int workerCount = await _maxProcessCount . Value ;
493
+ int workerCount = _environment . IsWorkerDynamicConcurrencyEnabled ( ) ? _workerConcurrencyOptions . Value . MaxWorkerCount : await _maxProcessCount . Value ;
494
494
if ( initializedWorkers . Count ( ) > workerCount )
495
495
{
496
496
throw new InvalidOperationException ( $ "Number of initialized language workers exceeded:{ initializedWorkers . Count ( ) } exceeded maxProcessCount: { workerCount } ") ;
You can’t perform that action at this time.
0 commit comments