@@ -190,6 +190,8 @@ def _compute_journeys(
190
190
crowfly_distance = crowfly_distance_between (
191
191
get_pt_object_coord (context .requested_orig_obj ), get_pt_object_coord (context .requested_dest_obj )
192
192
)
193
+
194
+ direct_path_timeout = app .config .get ("DIRECT_PATH_TIMEOUT" , 0.1 )
193
195
context .orig_proximities_by_crowfly = ProximitiesByCrowflyPool (
194
196
future_manager = future_manager ,
195
197
instance = instance ,
@@ -200,6 +202,7 @@ def _compute_journeys(
200
202
max_nb_crowfly_by_mode = request ['max_nb_crowfly_by_mode' ],
201
203
request_id = "{}_crowfly_orig" .format (request_id ),
202
204
o_d_crowfly_distance = crowfly_distance ,
205
+ direct_path_timeout = direct_path_timeout ,
203
206
)
204
207
205
208
context .dest_proximities_by_crowfly = ProximitiesByCrowflyPool (
@@ -212,6 +215,7 @@ def _compute_journeys(
212
215
max_nb_crowfly_by_mode = request ['max_nb_crowfly_by_mode' ],
213
216
request_id = "{}_crowfly_dest" .format (request_id ),
214
217
o_d_crowfly_distance = crowfly_distance ,
218
+ direct_path_timeout = direct_path_timeout ,
215
219
)
216
220
217
221
context .orig_places_free_access = PlacesFreeAccess (
@@ -240,6 +244,7 @@ def _compute_journeys(
240
244
request = request ,
241
245
direct_path_type = StreetNetworkPathType .BEGINNING_FALLBACK ,
242
246
request_id = "{}_fallback_orig" .format (request_id ),
247
+ direct_path_timeout = direct_path_timeout ,
243
248
)
244
249
245
250
context .dest_fallback_durations_pool = FallbackDurationsPool (
@@ -253,6 +258,7 @@ def _compute_journeys(
253
258
request = request ,
254
259
direct_path_type = StreetNetworkPathType .ENDING_FALLBACK ,
255
260
request_id = "{}_fallback_dest" .format (request_id ),
261
+ direct_path_timeout = direct_path_timeout ,
256
262
)
257
263
258
264
pt_journey_pool = PtJourneyPool (
@@ -389,6 +395,7 @@ def _compute_isochrone_common(
389
395
max_nb_crowfly_by_mode = request .get ('max_nb_crowfly_by_mode' , {}),
390
396
request_id = request_id ,
391
397
o_d_crowfly_distance = None ,
398
+ direct_path_timeout = None ,
392
399
)
393
400
394
401
places_free_access = PlacesFreeAccess (
@@ -416,6 +423,7 @@ def _compute_isochrone_common(
416
423
request = request ,
417
424
request_id = request_id ,
418
425
direct_path_type = direct_path_type ,
426
+ direct_path_timeout = None ,
419
427
)
420
428
421
429
# We don't need requested_orig_obj or requested_dest_obj for isochrone
0 commit comments