File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 11import typing as ty
2- from pathlib import Path
32import cloudpickle as cp
43import logging
54import attrs
65import psij
76from pydra .engine .job import Job
87from pydra .workers import base
8+ from pydra .utils .general import SCRIPTS_DIR
99
1010logger = logging .getLogger ("pydra.worker" )
1111
@@ -79,13 +79,12 @@ async def run(
7979 None
8080 """
8181 jex = psij .JobExecutor .get_instance (self .subtype )
82- absolute_path = Path (__file__ ).parent
8382
8483 cache_dir = job .cache_dir
8584 file_path = cache_dir / "runnable_function.pkl"
8685 with open (file_path , "wb" ) as file :
8786 cp .dump (job .run , file )
88- func_path = absolute_path / "run_pickled.py"
87+ func_path = SCRIPTS_DIR / "run_pickled.py"
8988 spec = self .make_spec ("python" , [func_path , file_path ])
9089
9190 if rerun :
You can’t perform that action at this time.
0 commit comments