File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,18 @@ protected virtual void Initialize()
9292 File . WriteAllText ( hostConfigFilePath , "{}" ) ;
9393 }
9494
95+ if ( ScriptConfig . HostConfig . IsDevelopment )
96+ {
97+ ScriptConfig . HostConfig . UseDevelopmentSettings ( ) ;
98+ }
99+ else
100+ {
101+ // TEMP: Until https://github.com/Azure/azure-webjobs-sdk-script/issues/100 is addressed
102+ // we're using some presets that are a good middle ground
103+ ScriptConfig . HostConfig . Queues . MaxPollingInterval = TimeSpan . FromSeconds ( 10 ) ;
104+ ScriptConfig . HostConfig . Singleton . ListenerLockPeriod = TimeSpan . FromSeconds ( 15 ) ;
105+ }
106+
95107 string json = File . ReadAllText ( hostConfigFilePath ) ;
96108 JObject hostConfig = JObject . Parse ( json ) ;
97109 ApplyConfiguration ( hostConfig , ScriptConfig ) ;
@@ -172,11 +184,6 @@ protected virtual void Initialize()
172184 ScriptConfig . HostConfig . AddService < IMetricsLogger > ( new MetricsLogger ( ) ) ;
173185 }
174186
175- if ( ScriptConfig . HostConfig . IsDevelopment )
176- {
177- ScriptConfig . HostConfig . UseDevelopmentSettings ( ) ;
178- }
179-
180187 // Bindings may use name resolution, so provide this before reading the bindings.
181188 var nameResolver = new NameResolver ( ) ;
182189
You can’t perform that action at this time.
0 commit comments