Version:

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 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.
SIGNATURE
def run_task_chain_bash_file(
    filename: pathlib.Path | str,
    stdout: pathlib.Path | str,
    stderr: pathlib.Path | str,
    cwd: pathlib.Path | str,
) -> JobStatus: ...
ARGUMENTS
Required
filename
Type:pathlib.Path | str
Description:
Path to the bash file.
Required
stdout
Type:pathlib.Path | str
Description:
Stdout for all tasks.
Required
stderr
Type:pathlib.Path | str
Description:
Stderr for all tasks.
Required
cwd
Type:pathlib.Path | str
Description:
Working directory for running the tasks.
RETURNS
Return type: JobStatus

run_task_chain_powershell_file()

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.
SIGNATURE
def run_task_chain_powershell_file(
    filename: pathlib.Path | str,
    stdout: pathlib.Path | str,
    stderr: pathlib.Path | str,
    cwd: pathlib.Path | str,
) -> JobStatus: ...
ARGUMENTS
Required
filename
Type:pathlib.Path | str
Description:
Path to the PowerShell file.
Required
stdout
Type:pathlib.Path | str
Description:
Stdout for all tasks.
Required
stderr
Type:pathlib.Path | str
Description:
Stderr for all tasks.
Required
cwd
Type:pathlib.Path | str
Description:
Working directory for running the tasks.
RETURNS
Return type: JobStatus

set_cwd()

Contextmanager changing the current working directory. Will restore the working directory upon exiting.
SIGNATURE
def set_cwd(path: pathlib.Path) -> typing.Generator[None, None, None]: ...
ARGUMENTS
Required
path
Type:pathlib.Path
Description:
The path to change the current working directory to.
RETURNS
Return type: typing.Generator[None, None, None]
PAGE CONTENTS