Skip to content

Commit

Permalink
compatibility with current and future crew
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Jan 27, 2025
1 parent 468af5a commit 7f43789
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 1 addition & 3 deletions R/class_crew.R
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ crew_class <- R6::R6Class(
} else {
self$controller$wait(
mode = "one",
seconds_interval = 0.5,
seconds_timeout = 0.5,
scale = TRUE,
throttle = TRUE
Expand Down Expand Up @@ -308,7 +307,6 @@ crew_summary <- function(controller) {
summary <- controller$summary()
data_frame(
controller = summary$controller,
worker = summary$worker,
seconds = summary$seconds,
targets = summary$tasks
)
Expand All @@ -318,7 +316,7 @@ database_crew <- function(path_store) {
database_init(
path = file.path(path_meta_dir(path_store), "crew"),
subkey = file.path(basename(path_meta("")), "crew"),
header = c("controller", "worker", "seconds", "targets"),
header = c("controller", "seconds", "targets"),
integer_columns = "targets",
numeric_columns = "seconds"
)
Expand Down
9 changes: 5 additions & 4 deletions R/tar_crew.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
#' where a `crew` controller was started, get summary-level information
#' of the workers.
#' @inheritSection tar_meta Storage access
#' @return A data frame one row per `crew` worker and the following columns:
#' @return A data frame one row per `crew` controller
#' (potentially multiple rows if `tar_option_get("controller")`
#' is a controller group) and the following columns:
#' * `controller`: name of the `crew` controller.
#' * `launches`: number of times the worker was launched.
#' * `seconds`: number of seconds the worker spent running tasks.
#' * `targets`: number of targets the worker completed and delivered.
#' * `targets`: number of times the controller attempted to run a target.
#' * `seconds`: number of seconds the workers spent running tasks.
#' @inheritParams tar_validate
#' @examples
#' if (identical(Sys.getenv("TAR_EXAMPLES"), "true")) { # for CRAN
Expand Down
9 changes: 5 additions & 4 deletions man/tar_crew.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7f43789

Please sign in to comment.