File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 6
6
# User packages
7
7
PKGS_PATH = "site/wwwroot/.python_packages"
8
8
VENV_PKGS_PATH = "site/wwwroot/worker_venv"
9
- WORKER_DIR = "azure_functions_worker"
10
9
11
10
PKGS = "lib/site-packages"
12
11
@@ -51,20 +50,18 @@ def determine_user_pkg_paths():
51
50
52
51
if __name__ == '__main__' :
53
52
# 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 )
56
53
func_worker_dir = str (Path (__file__ ).absolute ().parent )
57
54
env = os .environ
58
55
59
56
# Setting up python path for all environments to prioritize
60
57
# third-party user packages over worker packages in PYTHONPATH
61
58
user_pkg_paths = determine_user_pkg_paths ()
62
59
joined_pkg_paths = os .pathsep .join (user_pkg_paths )
63
- env ['PYTHONPATH' ] = f'{ worker_path } : { joined_pkg_paths } :{ func_worker_dir } '
60
+ env ['PYTHONPATH' ] = f'{ joined_pkg_paths } :{ func_worker_dir } '
64
61
65
62
if is_azure_environment ():
66
63
os .execve (sys .executable ,
67
- [sys .executable , '-m' , WORKER_DIR ]
64
+ [sys .executable , '-m' , 'azure_functions_worker' ]
68
65
+ sys .argv [1 :],
69
66
env )
70
67
else :
You can’t perform that action at this time.
0 commit comments