salvus.flow.executors.task_chain.run_task_chain_with_python
salvus.flow.executors.task_chain.run_task_chain_with_python 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: pathlib.Path | str,
stdout: pathlib.Path | str,
stderr: pathlib.Path | str,
cwd: pathlib.Path | str,
) -> 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
filenamepathlib.Path | str — Path to the bash file.stdoutpathlib.Path | str — Stdout for all tasks.stderrpathlib.Path | str — Stderr for all tasks.cwdpathlib.Path | str — Working directory for running the tasks.
Returns JobStatus
run_task_chain_powershell_file()
run_task_chain_powershell_file()def run_task_chain_powershell_file(
filename: pathlib.Path | str,
stdout: pathlib.Path | str,
stderr: pathlib.Path | str,
cwd: pathlib.Path | str,
) -> 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
filenamepathlib.Path | str — Path to the PowerShell file.stdoutpathlib.Path | str — Stdout for all tasks.stderrpathlib.Path | str — Stderr for all tasks.cwdpathlib.Path | str — Working directory for running the tasks.
Returns JobStatus
set_cwd()
set_cwd()def set_cwd(path: pathlib.Path) -> typing.Generator[None, None, None]: ...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 typing.Generator[None, None, None]