From 4c05b5d1ee403990f1b4c93d9933a7e1ecffafb0 Mon Sep 17 00:00:00 2001 From: wlandau Date: Wed, 10 Jul 2024 08:27:42 -0400 Subject: [PATCH] retry_tasks --- DESCRIPTION | 6 +++--- NEWS.md | 4 ++-- R/crew_controller_aws_batch.R | 4 +++- R/crew_package.R | 1 - README.Rmd | 2 +- README.md | 6 +++--- man/crew.aws.batch-package.Rd | 1 - man/crew_controller_aws_batch.Rd | 8 ++++++++ 8 files changed, 20 insertions(+), 12 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 41d07c4..80cde4b 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.5.9000 +Version: 0.0.6 License: MIT + file LICENSE URL: https://wlandau.github.io/crew.aws.batch/, https://github.com/wlandau/crew.aws.batch @@ -34,7 +34,7 @@ Depends: R (>= 4.0.0) Imports: cli (>= 3.1.0), - crew (>= 0.8.0), + crew (>= 0.9.5), paws.common (>= 0.7.0), paws.compute, paws.management, @@ -51,4 +51,4 @@ Encoding: UTF-8 Language: en-US Config/testthat/edition: 3 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 diff --git a/NEWS.md b/NEWS.md index cefdeb6..56487b7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ -# crew.aws.batch 0.0.5.9000 (development) - +# crew.aws.batch 0.0.6 +* Add a `retry_tasks` argument. # crew.aws.batch 0.0.5 diff --git a/R/crew_controller_aws_batch.R b/R/crew_controller_aws_batch.R index 987f2ee..849c4ad 100644 --- a/R/crew_controller_aws_batch.R +++ b/R/crew_controller_aws_batch.R @@ -34,6 +34,7 @@ crew_controller_aws_batch <- function( seconds_launch = 1800, seconds_idle = Inf, seconds_wall = Inf, + retry_tasks = TRUE, tasks_max = Inf, tasks_timers = 0L, reset_globals = TRUE, @@ -68,7 +69,8 @@ crew_controller_aws_batch <- function( tls_enable = tls_enable, tls_config = tls_config, seconds_interval = seconds_interval, - seconds_timeout = seconds_timeout + seconds_timeout = seconds_timeout, + retry_tasks = retry_tasks ) launcher <- crew_launcher_aws_batch( name = name, diff --git a/R/crew_package.R b/R/crew_package.R index 0122ec6..ba1357b 100644 --- a/R/crew_package.R +++ b/R/crew_package.R @@ -1,6 +1,5 @@ #' @title crew.aws.batch: a crew launcher plugin for AWS Batch #' @name crew.aws.batch-package -#' @docType package #' @family help #' @description In computationally demanding analysis projects, #' statisticians and data scientists asynchronously diff --git a/README.Rmd b/README.Rmd index 8809333..33dd8dd 100644 --- a/README.Rmd +++ b/README.Rmd @@ -263,7 +263,7 @@ controller <- crew_controller_aws_batch( controller$start() ``` -At this point, usage is exactly the same as basic [`crew`](https://wlandau.github.io/crew). The `push()` method submits tasks and auto-scales [AWS Batch](https://aws.amazon.com/batch/) workers to meet demand. +At this point, usage is exactly the same as basic [`crew`](https://wlandau.github.io/crew/). The `push()` method submits tasks and auto-scales [AWS Batch](https://aws.amazon.com/batch/) workers to meet demand. ```{r} controller$push(name = "do work", command = do_work()) diff --git a/README.md b/README.md index 6dc6b23..a11f6d0 100644 --- a/README.md +++ b/README.md @@ -340,7 +340,7 @@ controller$start() ``` At this point, usage is exactly the same as basic -[`crew`](https://wlandau.github.io/crew). The `push()` method submits +[`crew`](https://wlandau.github.io/crew/). The `push()` method submits tasks and auto-scales [AWS Batch](https://aws.amazon.com/batch/) workers to meet demand. @@ -411,7 +411,7 @@ citation("crew.aws.batch") To cite package 'crew.aws.batch' in publications use: Landau WM (????). _crew.aws.batch: A Crew Launcher Plugin for AWS - Batch_. R package version 0.0.4, + Batch_. R package version 0.0.6, https://github.com/wlandau/crew.aws.batch, . @@ -420,7 +420,7 @@ A BibTeX entry for LaTeX users is @Manual{, title = {crew.aws.batch: A Crew Launcher Plugin for AWS Batch}, author = {William Michael Landau}, - note = {R package version 0.0.4, + note = {R package version 0.0.6, https://github.com/wlandau/crew.aws.batch}, url = {https://wlandau.github.io/crew.aws.batch/}, } diff --git a/man/crew.aws.batch-package.Rd b/man/crew.aws.batch-package.Rd index ab4b425..85be8ff 100644 --- a/man/crew.aws.batch-package.Rd +++ b/man/crew.aws.batch-package.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/crew_package.R -\docType{package} \name{crew.aws.batch-package} \alias{crew.aws.batch-package} \title{crew.aws.batch: a crew launcher plugin for AWS Batch} diff --git a/man/crew_controller_aws_batch.Rd b/man/crew_controller_aws_batch.Rd index 0a695c7..0b44344 100644 --- a/man/crew_controller_aws_batch.Rd +++ b/man/crew_controller_aws_batch.Rd @@ -17,6 +17,7 @@ crew_controller_aws_batch( seconds_launch = 1800, seconds_idle = Inf, seconds_wall = Inf, + retry_tasks = TRUE, tasks_max = Inf, tasks_timers = 0L, reset_globals = TRUE, @@ -92,6 +93,13 @@ The timer does not launch until \code{tasks_timers} tasks have completed. See the \code{walltime} argument of \code{mirai::daemon()}.} +\item{retry_tasks}{\code{TRUE} to automatically retry a task in the event of +an unexpected worker exit. \code{FALSE} to give up on the first exit and +return a \code{mirai} error code (code number 19). +\code{TRUE} (default) is recommended in most situations. +Use \code{FALSE} for debugging purposes, e.g. to confirm that a task +is causing a worker to run out of memory or crash in some other way.} + \item{tasks_max}{Maximum number of tasks that a worker will do before exiting. See the \code{maxtasks} argument of \code{mirai::daemon()}. \code{crew} does not