Skip to content

Commit 18d6231

Browse files
committed
Addressed comments
1 parent 6b57608 commit 18d6231

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

azure_functions_worker/dispatcher.py

+9-12
Original file line numberDiff line numberDiff line change
@@ -397,17 +397,15 @@ async def _handle__function_load_request(self, request):
397397
function_metadata = func_request.metadata
398398
function_name = function_metadata.name
399399
function_app_directory = function_metadata.directory
400-
function_already_indexed = self._functions.get_function(function_id)
401400

402401
logger.info(
403402
'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)
407405

408406
programming_model = "V2"
409407
try:
410-
if not function_already_indexed:
408+
if not self._functions.get_function(function_id):
411409

412410
if function_metadata.properties.get(
413411
METADATA_PROPERTIES_WORKER_INDEXED, False):
@@ -416,13 +414,12 @@ async def _handle__function_load_request(self, request):
416414
# calling the metadata request. In this case we index the
417415
# function and update the workers registry
418416

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
426423

427424
# For the second worker, if there was an exception in
428425
# indexing, we raise it here

0 commit comments

Comments
 (0)