Commit 8a693e068780d19f7f4f2c957be176924ae55462

Authored by Antoine Goutenoir
1 parent 18ba3d7a
Exists in master

Glue the extra configuration upstream some more.

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
flaskr/controllers/main_controller.py
@@ -234,10 +234,10 @@ def compute(): # process the queue of estimation requests @@ -234,10 +234,10 @@ def compute(): # process the queue of estimation requests
234 # GRAB AND CONFIGURE THE EMISSION MODELS ################################## 234 # GRAB AND CONFIGURE THE EMISSION MODELS ##################################
235 235
236 emission_models = estimation.get_models() 236 emission_models = estimation.get_models()
237 - # mdl_slugs = estimation.models_slugs.split("\n")  
238 - # emission_models = [m for m in get_emission_models() if m.slug in mdl_slugs]  
239 # print(emission_models) 237 # print(emission_models)
240 238
  239 + extra_config = {}
  240 +
241 # PREPARE RESULT DICTIONARY THAT WILL BE STORED ########################### 241 # PREPARE RESULT DICTIONARY THAT WILL BE STORED ###########################
242 242
243 results = {} 243 results = {}
@@ -349,7 +349,7 @@ def compute(): # process the queue of estimation requests @@ -349,7 +349,7 @@ def compute(): # process the queue of estimation requests
349 results = compute_one_to_many( 349 results = compute_one_to_many(
350 _origin=origins[0], 350 _origin=origins[0],
351 _destinations=destinations, 351 _destinations=destinations,
352 - _extra_config={}, 352 + _extra_config=extra_config,
353 ) 353 )
354 354
355 # SCENARIO B : At Least One Origin, One Destination ####################### 355 # SCENARIO B : At Least One Origin, One Destination #######################
@@ -360,7 +360,7 @@ def compute(): # process the queue of estimation requests @@ -360,7 +360,7 @@ def compute(): # process the queue of estimation requests
360 results = compute_one_to_many( 360 results = compute_one_to_many(
361 _origin=destinations[0], 361 _origin=destinations[0],
362 _destinations=origins, 362 _destinations=origins,
363 - _extra_config={}, 363 + _extra_config=extra_config,
364 ) 364 )
365 365
366 # SCENARIO C : At Least One Origin, At Least One Destination ############## 366 # SCENARIO C : At Least One Origin, At Least One Destination ##############
@@ -381,7 +381,7 @@ def compute(): # process the queue of estimation requests @@ -381,7 +381,7 @@ def compute(): # process the queue of estimation requests
381 city_results = compute_one_to_many( 381 city_results = compute_one_to_many(
382 _origin=destination, 382 _origin=destination,
383 _destinations=origins, 383 _destinations=origins,
384 - _extra_config={}, 384 + _extra_config=extra_config,
385 ) 385 )
386 city_results['city'] = city_key 386 city_results['city'] = city_key
387 city_results['address'] = destination.address 387 city_results['address'] = destination.address