From f009da347c6ed973fa57f7fe7ce8051ee8b039a3 Mon Sep 17 00:00:00 2001 From: wlandau-lilly Date: Mon, 4 Dec 2023 10:39:27 -0500 Subject: [PATCH] cli_dispatched() --- R/class_timestamp.R | 2 +- R/class_verbose.R | 2 +- R/utils_cli.R | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/R/class_timestamp.R b/R/class_timestamp.R index b1d6e14f..2c617661 100644 --- a/R/class_timestamp.R +++ b/R/class_timestamp.R @@ -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, diff --git a/R/class_verbose.R b/R/class_verbose.R index 815eed95..438d7935 100644 --- a/R/class_verbose.R +++ b/R/class_verbose.R @@ -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 diff --git a/R/utils_cli.R b/R/utils_cli.R index 4267e103..aa513dbe 100644 --- a/R/utils_cli.R +++ b/R/utils_cli.R @@ -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) }