3030 PYTHON_ENABLE_DEBUG_LOGGING ,
3131 PYTHON_SCRIPT_FILE_NAME ,
3232 PYTHON_SCRIPT_FILE_NAME_DEFAULT ,
33- PYTHON_LANGUAGE_RUNTIME , CUSTOMER_PACKAGES_PATH )
33+ PYTHON_LANGUAGE_RUNTIME )
3434from .extension import ExtensionManager
3535from .logging import disable_console_logging , enable_console_logging
3636from .logging import (logger , error_logger , is_system_log_category ,
@@ -299,13 +299,8 @@ async def _handle__worker_init_request(self, request):
299299 DependencyManager .prioritize_customer_dependencies ()
300300
301301 if DependencyManager .is_in_linux_consumption ():
302- logger .info (
303- "Importing azure functions in WorkerInitRequest" )
304302 import azure .functions # NoQA
305303
306- if CUSTOMER_PACKAGES_PATH not in sys .path :
307- logger .warning ("Customer packages not in sys path." )
308-
309304 # loading bindings registry and saving results to a static
310305 # dictionary which will be later used in the invocation request
311306 bindings .load_binding_registry ()
@@ -343,8 +338,6 @@ async def _handle__functions_metadata_request(self, request):
343338
344339 if not os .path .exists (function_path ):
345340 # Fallback to legacy model
346- logger .info ("%s does not exist. "
347- "Switching to host indexing." , script_file_name )
348341 return protos .StreamingMessage (
349342 request_id = request .request_id ,
350343 function_metadata_response = protos .FunctionMetadataResponse (
@@ -379,7 +372,7 @@ async def _handle__function_load_request(self, request):
379372 'Received WorkerLoadRequest, request ID %s, function_id: %s,'
380373 'function_name: %s,' , self .request_id , function_id , function_name )
381374
382- programming_model = "V1 "
375+ programming_model = "V2 "
383376 try :
384377 if not self ._functions .get_function (function_id ):
385378 script_file_name = get_app_setting (
@@ -396,10 +389,11 @@ async def _handle__function_load_request(self, request):
396389 # indexing is enabled and load request is called without
397390 # calling the metadata request. In this case we index the
398391 # function and update the workers registry
399- programming_model = "V2"
400392 _ = self .index_functions (function_path )
401393 else :
402394 # legacy function
395+ programming_model = "V1"
396+
403397 func = loader .load_function (
404398 func_request .metadata .name ,
405399 func_request .metadata .directory ,
0 commit comments