mockslurm.mock_sbatch.launch_job¶
- mockslurm.mock_sbatch.launch_job(cmd: str, stdout: str, stderr: str, job_idx: int, job_dependency: List[Tuple[bool, Dict[str, List[int]]]])[source]¶
Runs cmd as a detached subprocess.
The return code of cmd is retrieved by the detached subprocess and updated in the DB.
- Parameters:
cmd (str) – Command to run, similar to the content of the –wrap= argument of sbatch
stdout (str) – Path to a file where the output of cmd will be piped
stderr (str) – Path to a file where the errors of cmd will be piped
job_idx (int) – Index of the job in the DB
job_dependency (List[Tuple[bool, Dict[str, List[int]]]]) – Job dependencies. Each tuple in the list corresponds to a dependency specification. See mockslurm.mock_sbatch.parse_dependency