diff --git a/DESCRIPTION b/DESCRIPTION index 68ad71e..433f453 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -13,7 +13,7 @@ Description: In computationally demanding analysis projects, 'clustermq' by Schubert (2019) ), and 'batchtools' by Lang, Bischl, and Surmann (2017). . -Version: 0.0.6.9000 +Version: 0.0.6.9001 License: MIT + file LICENSE URL: https://wlandau.github.io/crew.aws.batch/, https://github.com/wlandau/crew.aws.batch @@ -51,4 +51,4 @@ Encoding: UTF-8 Language: en-US Config/testthat/edition: 3 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 diff --git a/NEWS.md b/NEWS.md index 5eba8f6..8775535 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ -# crew.aws.batch 0.0.6.9000 (development) - +# crew.aws.batch 0.0.6.9001 (development) +* Send both cancellation and termination requests to end jobs. # crew.aws.batch 0.0.6 diff --git a/R/crew_launcher_aws_batch.R b/R/crew_launcher_aws_batch.R index 98bbc11..84f69e9 100644 --- a/R/crew_launcher_aws_batch.R +++ b/R/crew_launcher_aws_batch.R @@ -570,6 +570,10 @@ crew_launcher_aws_batch_terminate <- function(args_client, job_id) { # nocov start # Tested in tests/controller/minimal.R client <- do.call(what = paws.compute::batch, args = args_client) + client$cancel_job( + jobId = job_id, + reason = "cancelled by crew controller" + ) client$terminate_job( jobId = job_id, reason = "terminated by crew controller" diff --git a/R/crew_monitor_aws_batch.R b/R/crew_monitor_aws_batch.R index 721dbca..5fc3518 100644 --- a/R/crew_monitor_aws_batch.R +++ b/R/crew_monitor_aws_batch.R @@ -190,7 +190,7 @@ crew_class_monitor_aws_batch <- R6::R6Class( #' if the R process is interactive and `length(ids)` is greater than 1. terminate = function( ids, - reason = "terminated by crew.aws.batch monitor", + reason = "cancelled/terminated by crew.aws.batch monitor", verbose = TRUE ) { # Covered in tests/interactive/jobs.R @@ -215,6 +215,7 @@ crew_class_monitor_aws_batch <- R6::R6Class( client <- private$.client() progress <- progress_init(verbose = verbose, total = length(ids)) for (id in ids) { + client$cancel_job(jobId = id, reason = reason) client$terminate_job(jobId = id, reason = reason) progress_update(progress) } diff --git a/man/crew_class_monitor_aws_batch.Rd b/man/crew_class_monitor_aws_batch.Rd index 238d882..a6e33b1 100644 --- a/man/crew_class_monitor_aws_batch.Rd +++ b/man/crew_class_monitor_aws_batch.Rd @@ -126,7 +126,7 @@ Terminate one or more AWS Batch jobs. \subsection{Usage}{ \if{html}{\out{
}}\preformatted{crew_class_monitor_aws_batch$terminate( ids, - reason = "terminated by crew.aws.batch monitor", + reason = "cancelled/terminated by crew.aws.batch monitor", verbose = TRUE )}\if{html}{\out{
}} }