File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 66# User packages
77PKGS_PATH = "site/wwwroot/.python_packages"
88VENV_PKGS_PATH = "site/wwwroot/worker_venv"
9+ WORKER_DIR = "azure_functions_worker"
910
1011PKGS = "lib/site-packages"
1112
@@ -50,18 +51,20 @@ def determine_user_pkg_paths():
5051
5152if __name__ == '__main__' :
5253 # worker.py lives in the same directory as azure_functions_worker
54+ current_dir = str (Path (__file__ ).absolute ())
55+ worker_path = os .path .join (current_dir , WORKER_DIR )
5356 func_worker_dir = str (Path (__file__ ).absolute ().parent )
5457 env = os .environ
5558
5659 # Setting up python path for all environments to prioritize
5760 # third-party user packages over worker packages in PYTHONPATH
5861 user_pkg_paths = determine_user_pkg_paths ()
5962 joined_pkg_paths = os .pathsep .join (user_pkg_paths )
60- env ['PYTHONPATH' ] = f'{ joined_pkg_paths } :{ func_worker_dir } '
63+ env ['PYTHONPATH' ] = f'{ worker_path } : { joined_pkg_paths } :{ func_worker_dir } '
6164
6265 if is_azure_environment ():
6366 os .execve (sys .executable ,
64- [sys .executable , '-m' , 'azure_functions_worker' ]
67+ [sys .executable , '-m' , WORKER_DIR ]
6568 + sys .argv [1 :],
6669 env )
6770 else :
You can’t perform that action at this time.
0 commit comments