Skip to content

Commit b5fad9c

Browse files
Merge pull request #941 from linsword13/fix-script
Make sure to terminate script upon missing job-id
2 parents 5e19a9e + 795372b commit b5fad9c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

var/ramble/repos/builtin/workflow_managers/slurm/batch_cancel.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
. {batch_helpers}
44

5-
job_id=$(get_job_id)
5+
job_id=$(get_job_id) || exit 0
66

77
scancel ${job_id}

var/ramble/repos/builtin/workflow_managers/slurm/batch_query.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
. {batch_helpers}
44

5-
job_id=$(get_job_id)
5+
job_id=$(get_job_id) || exit 0
66

77
# Set up the status_map mapping between
88
# sacct/squeue status to ramble counterpart

var/ramble/repos/builtin/workflow_managers/slurm/batch_wait.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
. {batch_helpers}
44

5-
job_id=$(get_job_id)
5+
job_id=$(get_job_id) || exit 0
66

77
echo "Waiting for job {job_name} with id ${job_id} to complete..."
88

0 commit comments

Comments
 (0)