Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Jan 9, 2025
1 parent 918c939 commit 599c278
Show file tree
Hide file tree
Showing 15 changed files with 76 additions and 24 deletions.
10 changes: 7 additions & 3 deletions R/class_forecast.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ forecast_class <- R6::R6Class(
self$buffer <- NULL
}
},
report_outdated = function(outdated) {
self$buffer <- cli_forecast(outdated$cli_data(), print = FALSE)
self$poll()
report_outdated = function(outdated, force = FALSE) {
now <- time_seconds_local()
if (force || ((now - seconds_flushed) > seconds_interval)) {
self$buffer <- cli_forecast(outdated$cli_data(), print = FALSE)
flush_messages()
self$seconds_flushed <- now
}
},
report_end = function(progress = NULL, seconds_elapsed = NULL) {
self$flush_messages()
Expand Down
9 changes: 5 additions & 4 deletions R/class_outdated.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ outdated_class <- R6::R6Class(
target <- pipeline_get_target(pipeline, name)
if_any(
inherits(target, "tar_pattern"),
self$process_pattern(target),
self$process_builder(target)
process_pattern(target),
process_builder(target)
)
self$register_checked(name)
self$scheduler$reporter$report_outdated(self)
register_checked(name)
scheduler$reporter$report_outdated(self)
},
run = function() {
self$start()
Expand All @@ -188,6 +188,7 @@ outdated_class <- R6::R6Class(
name <- dequeue()
self$process_target(name, pipeline)
}
self$scheduler$reporter$report_outdated(self, force = TRUE)
self$end()
},
validate = function() {
Expand Down
2 changes: 1 addition & 1 deletion R/class_reporter.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ reporter_class <- R6::R6Class(
},
report_canceled = function(target = NULL, progress = NULL) {
},
report_outdated = function(outdated) {
report_outdated = function(outdated, force = FALSE) {
},
report_workspace = function(target) {
},
Expand Down
3 changes: 1 addition & 2 deletions R/class_silent.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ silent_class <- R6::R6Class(
inherit = reporter_class,
class = FALSE,
portable = FALSE,
cloneable = FALSE,
public = list()
cloneable = FALSE
)
7 changes: 7 additions & 0 deletions R/tar_config_set.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
#' When the pipeline ends,
#' all the metadata and progress data is saved immediately,
#' regardless of `seconds_meta_append`.
#'
#' When the pipeline is just skipping targets, the actual interval
#' between saves is `max(1, seconds_meta_append)` to reduce
#' overhead.
#' @param seconds_meta_upload Argument of [tar_make()], [tar_make_clustermq()],
#' and [tar_make_future()].
#' Positive numeric of length 1 with the minimum
Expand All @@ -100,6 +104,9 @@
#' number of seconds between times when the reporter prints progress
#' messages to the R console (for the aforementioned
#' [tar_make()]-like functions only).
#' When the pipeline is just skipping targets,
#' the actual interval between messages is `max(1, seconds_reporter)`
#' to reduce overhead.
#' @param seconds_reporter_outdated Argument of [tar_outdated()]
#' and other related functions that do not run the pipeline.
#' Positive numeric of length 1 with the minimum
Expand Down
8 changes: 7 additions & 1 deletion R/tar_make.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
#' When the pipeline ends,
#' all the metadata and progress data is saved immediately,
#' regardless of `seconds_meta_append`.
#'
#' When the pipeline is just skipping targets, the actual interval
#' between saves is `max(1, seconds_meta_append)` to reduce
#' overhead.
#' @param seconds_meta_upload Positive numeric of length 1 with the minimum
#' number of seconds between uploads of the metadata and progress data
#' to the cloud
Expand All @@ -69,7 +73,9 @@
#' regardless of `seconds_meta_upload`.
#' @param seconds_reporter Positive numeric of length 1 with the minimum
#' number of seconds between times when the reporter prints progress
#' messages to the R console.
#' messages to the R console. When the pipeline is just skipping targets,
#' the actual interval between messages is `max(1, seconds_reporter)`
#' to reduce overhead.
#' @param garbage_collection Deprecated. Use the `garbage_collection`
#' argument of [tar_option_set()] instead to run garbage collection
#' at regular intervals in a pipeline, or use the argument of the same
Expand Down
11 changes: 9 additions & 2 deletions man/tar_config_set.Rd

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

10 changes: 8 additions & 2 deletions man/tar_make.Rd

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

10 changes: 8 additions & 2 deletions man/tar_make_clustermq.Rd

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

10 changes: 8 additions & 2 deletions man/tar_make_future.Rd

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

4 changes: 3 additions & 1 deletion man/tar_mermaid.Rd

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

4 changes: 3 additions & 1 deletion man/tar_network.Rd

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

4 changes: 3 additions & 1 deletion man/tar_outdated.Rd

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

4 changes: 3 additions & 1 deletion man/tar_sitrep.Rd

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

4 changes: 3 additions & 1 deletion man/tar_visnetwork.Rd

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

0 comments on commit 599c278

Please sign in to comment.