salvus.flow.executors.task_chain.run_task_chain_with_python
Python interpreter for the main bash file running a task chain.
Useful when running multiple task chains in sequence as the import costs largely only has to be paid once.
Functions
run_task_chain_bash_file()
run_task_chain_bash_file()def run_task_chain_bash_file(
filename: Union[str, pathlib.Path],
stdout: Union[str, pathlib.Path],
stderr: Union[str, pathlib.Path],
cwd: Union[str, pathlib.Path],
) -> salvus.flow.executors.types.JobStatus: ...Run the bash file for a single task chain fully within Python. The main advantage is that import costs in the Python part only have to paid once.
Parameters
filenameUnion[str, pathlib.Path] — Path to the bash file.stdoutUnion[str, pathlib.Path] — Stdout for all tasks.stderrUnion[str, pathlib.Path] — Stderr for all tasks.cwdUnion[str, pathlib.Path] — Working directory for running the tasks.
Returns salvus.flow.executors.types.JobStatus
run_task_chain_powershell_file()
run_task_chain_powershell_file()def run_task_chain_powershell_file(
filename: Union[str, pathlib.Path],
stdout: Union[str, pathlib.Path],
stderr: Union[str, pathlib.Path],
cwd: Union[str, pathlib.Path],
) -> salvus.flow.executors.types.JobStatus: ...Run the powershell file for a single task chain fully within Python. The main advantage is that import costs in the Python part only have to paid once.
Parameters
filenameUnion[str, pathlib.Path] — Path to the PowerShell file.stdoutUnion[str, pathlib.Path] — Stdout for all tasks.stderrUnion[str, pathlib.Path] — Stderr for all tasks.cwdUnion[str, pathlib.Path] — Working directory for running the tasks.
Returns salvus.flow.executors.types.JobStatus
set_cwd()
set_cwd()def set_cwd(path: pathlib.Path) -> Generator[NoneType, NoneType, NoneType]: ...Contextmanager changing the current working directory. Will restore the working directory upon exiting.
Parameters
pathpathlib.Path — The path to change the current working directory to.
Returns Generator[NoneType, NoneType, NoneType]