apps.crc_scancel
A simple wrapper around the Slurm scancel
command.
This application allows users to cancel a Slurm job by providing a job ID.
It differs from the default scancel
command by adding a confirmation
prompt to confirm users are canceling the correct job.
Module Contents
- class CrcScancel
Bases:
apps.utils.cli.BaseParser
Cancel a Slurm job submitted by the current user.
- user
- int_as_str
- static cancel_job_on_cluster(cluster: str, job_id: int) None
Cancel a running slurm job
- Parameters:
cluster – The name of the cluster the job is running on
job_id – The ID of the slurm job to cancel
- get_cluster_for_job_id(job_id: int) str
Return the name of the cluster a slurm job is running on
Exits the application with an error
- Parameters:
job_id – The ID of th slurm job
- Returns:
The name of the cluster as a string
- app_logic(args: argparse.Namespace) None
Logic to evaluate when executing the application
- Parameters:
args – Namespace of parsed arguments from the command line