Skip to content

Commit e04fbe1

Browse files
gavin-aguiarGavin Aguiar
and
Gavin Aguiar
authored
Revert: Added worker to pythonpath (#1233)
* Revert "Added worker to pythonpath (#1215)" This reverts commit a60ef25. * Revert "Added worker to pythonpath (#1215)" This reverts commit a60ef25. * Deleted empty worker.py file --------- Co-authored-by: Gavin Aguiar <gavin@GavinPC>
1 parent 68e7b19 commit e04fbe1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

python/prodV4/worker.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# User packages
77
PKGS_PATH = "site/wwwroot/.python_packages"
88
VENV_PKGS_PATH = "site/wwwroot/worker_venv"
9-
WORKER_DIR = "azure_functions_worker"
109

1110
PKGS = "lib/site-packages"
1211

@@ -51,20 +50,18 @@ def determine_user_pkg_paths():
5150

5251
if __name__ == '__main__':
5352
# 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)
5653
func_worker_dir = str(Path(__file__).absolute().parent)
5754
env = os.environ
5855

5956
# Setting up python path for all environments to prioritize
6057
# third-party user packages over worker packages in PYTHONPATH
6158
user_pkg_paths = determine_user_pkg_paths()
6259
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}'
6461

6562
if is_azure_environment():
6663
os.execve(sys.executable,
67-
[sys.executable, '-m', WORKER_DIR]
64+
[sys.executable, '-m', 'azure_functions_worker']
6865
+ sys.argv[1:],
6966
env)
7067
else:

0 commit comments

Comments
 (0)