mockslurm.mock_sbatch.check_dependency

mockslurm.mock_sbatch.check_dependency(job_dependency: List[Tuple[bool, Dict[str, List[int]]]]) str[source]

Check if a job’s dependency are satisfied

Parameters:

job_dependency (Tuple[bool, List[Dict[str, List[int]]]]) – Job dependencies. Each tuple in the list corresponds to a dependency specification. See mockslurm.mock_sbatch.parse_dependency

Warning

This function only supports the “afterok” dependency specification, anything else causes a NotImplementedError to be raised.

Raises:

NotImplementedError – If the dependency type is not “afterok”

Returns:

The action to follow based on the dependency evaluation, for instance to wait, to start job, etc.

Return type:

DependencyActions