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()
92
92
File . WriteAllText ( hostConfigFilePath , "{}" ) ;
93
93
}
94
94
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
+
95
107
string json = File . ReadAllText ( hostConfigFilePath ) ;
96
108
JObject hostConfig = JObject . Parse ( json ) ;
97
109
ApplyConfiguration ( hostConfig , ScriptConfig ) ;
@@ -172,11 +184,6 @@ protected virtual void Initialize()
172
184
ScriptConfig . HostConfig . AddService < IMetricsLogger > ( new MetricsLogger ( ) ) ;
173
185
}
174
186
175
- if ( ScriptConfig . HostConfig . IsDevelopment )
176
- {
177
- ScriptConfig . HostConfig . UseDevelopmentSettings ( ) ;
178
- }
179
-
180
187
// Bindings may use name resolution, so provide this before reading the bindings.
181
188
var nameResolver = new NameResolver ( ) ;
182
189
You can’t perform that action at this time.
0 commit comments