Skip to content

Commit

Permalink
assert batch_size <= 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Nov 7, 2023
1 parent d971aa4 commit 13470ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/tar_delete.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
#' @param cloud Logical of length 1, whether to delete objects
#' from the cloud if applicable (e.g. AWS, GCP). If `FALSE`,
#' files are not deleted from the cloud.
#' @param batch_size Positive integer, number of target objects to delete
#' @param batch_size Positive integer between 1 and 1000,
#' number of target objects to delete
#' from the cloud with each HTTP API request.
#' Currently only supported for AWS.
#' Cannot be more than 1000.
#' @param verbose Logical of length 1, whether to print console messages
#' to show progress when deleting each batch of targets from each
#' cloud bucket. Batched deletion with verbosity is currently only supported
Expand Down Expand Up @@ -66,6 +68,7 @@ tar_delete <- function(
tar_assert_scalar(batch_size)
tar_assert_none_na(batch_size)
tar_assert_ge(batch_size, 1L)
tar_assert_le(batch_size, 1000L)
tar_assert_lgl(verbose)
tar_assert_scalar(verbose)
tar_assert_none_na(verbose)
Expand Down
1 change: 1 addition & 0 deletions R/tar_destroy.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ tar_destroy <- function(
tar_assert_scalar(batch_size)
tar_assert_none_na(batch_size)
tar_assert_ge(batch_size, 1L)
tar_assert_le(batch_size, 1000L)
tar_assert_lgl(verbose)
tar_assert_scalar(verbose)
tar_assert_none_na(verbose)
Expand Down
1 change: 1 addition & 0 deletions R/tar_prune.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ tar_prune <- function(
tar_assert_scalar(batch_size)
tar_assert_none_na(batch_size)
tar_assert_ge(batch_size, 1L)
tar_assert_le(batch_size, 1000L)
tar_assert_lgl(verbose)
tar_assert_scalar(verbose)
tar_assert_none_na(verbose)
Expand Down

0 comments on commit 13470ef

Please sign in to comment.