Skip to content

Commit

Permalink
cli_dispatched()
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Dec 4, 2023
1 parent cf2a6d8 commit f009da3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/class_timestamp.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ timestamp_class <- R6::R6Class(
},
report_dispatched = function(target, progress = NULL) {
self$buffer_message(
cli_start(
cli_dispatched(
target_get_name(target),
target_get_type_cli(target),
time_stamp = TRUE,
Expand Down
2 changes: 1 addition & 1 deletion R/class_verbose.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ verbose_class <- R6::R6Class(
},
report_dispatched = function(target, progress = NULL) {
self$buffer_message(
cli_start(
cli_dispatched(
target_get_name(target),
target_get_type_cli(target),
print = FALSE
Expand Down
9 changes: 7 additions & 2 deletions R/utils_cli.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
cli_start <- function(name, prefix = NULL, time_stamp = FALSE, print = TRUE) {
cli_dispatched <- function(
name,
prefix = NULL,
time_stamp = FALSE,
print = TRUE
) {
time <- if_any(time_stamp, time_stamp(), NULL)
msg <- paste(c(time, "start", prefix, name), collapse = " ")
msg <- paste(c(time, "dispatched", prefix, name), collapse = " ")
cli_blue_play(msg, print = print)
}

Expand Down

0 comments on commit f009da3

Please sign in to comment.