lst_auto_rta.Auto_RTA.scancel_jobs¶
- lst_auto_rta.Auto_RTA.scancel_jobs(job_ids: List[int], signal: Signals, delay_s: float = None, ignore_error: bool = False)[source]¶
Run scancel on `job_ids, sending signal after delay_s seconds.
Use the –quiet argument of scancel to not raise error if the jobs are already stopped.
- Parameters:
job_ids (List[str]) – List of job ids to scancel
signal (signal.Signals) – Signal to send with scancel
delay_s (float, optional) – Amount of time in second to wait before performing the scancel
ignore_error (bool, optional) – If True, the scancel is run directly with subprocess.srun, and any error happening in the subprocess is simply ignored. This is usefull when running scancel -s KILL after a scancel -s INT: if the SIGINT stopped the job already, the SIGKILL would have exit code 1 even with –quiet, but we want to ignore the error in this case.