@@ -397,17 +397,15 @@ async def _handle__function_load_request(self, request):
397
397
function_metadata = func_request .metadata
398
398
function_name = function_metadata .name
399
399
function_app_directory = function_metadata .directory
400
- function_already_indexed = self ._functions .get_function (function_id )
401
400
402
401
logger .info (
403
402
'Received WorkerLoadRequest, request ID %s, function_id: %s,'
404
- 'function_name: %s, function_already_indexed: %s' ,
405
- self .request_id , function_id , function_name ,
406
- function_already_indexed )
403
+ 'function_name: %s' ,
404
+ self .request_id , function_id , function_name )
407
405
408
406
programming_model = "V2"
409
407
try :
410
- if not function_already_indexed :
408
+ if not self . _functions . get_function ( function_id ) :
411
409
412
410
if function_metadata .properties .get (
413
411
METADATA_PROPERTIES_WORKER_INDEXED , False ):
@@ -416,13 +414,12 @@ async def _handle__function_load_request(self, request):
416
414
# calling the metadata request. In this case we index the
417
415
# function and update the workers registry
418
416
419
- if not is_envvar_true (PYTHON_ENABLE_INIT_INDEXING ):
420
- try :
421
- self .load_function_metadata (
422
- function_app_directory ,
423
- caller_info = "functions_load_request" )
424
- except Exception as ex :
425
- self ._function_metadata_exception = ex
417
+ try :
418
+ self .load_function_metadata (
419
+ function_app_directory ,
420
+ caller_info = "functions_load_request" )
421
+ except Exception as ex :
422
+ self ._function_metadata_exception = ex
426
423
427
424
# For the second worker, if there was an exception in
428
425
# indexing, we raise it here
0 commit comments