Skip to content

Commit

Permalink
Update progress bar to be current and run in caller env
Browse files Browse the repository at this point in the history
  • Loading branch information
brancengregory committed Apr 15, 2024
1 parent b7fbfa6 commit 2bf2f44
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions R/ojo_collect.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,14 @@ collect_data <- function(.con, .data, n_results, .silent) {
}
}

if (!.silent) {
cli::cli_progress_done()
}

return(res)
}

init_progress_bar <- function(n_results) {
cli::cli_progress_bar(name = "dl_pb", total = n_results, clear = FALSE)
cli::cli_progress_bar(
type = "iterator",
total = n_results,
clear = FALSE,
.envir = rlang::caller_env()
)
}

0 comments on commit 2bf2f44

Please sign in to comment.