Skip to content

Disable progress bar but keep sticky messages #176

@john-ioannides

Description

@john-ioannides

I am running a lengthy process (~5 hours) in parallel using furrr::future_walk and want to display a real-time message of the progress at each iteration.
I have all outputs redirected to a logfile so keeping the progress bar clutters the output.
The parallel workers are opened using future::multisession if it makes any difference.

Sample code:

steps = 10
progressr::with_progress({
  p <- progressr::progressor(steps=steps)
  
  furrr::future_walk(1:steps, ~{
    
    if(.x/2==0){
      Sys.sleep(2)
    } else {
      Sys.sleep(8)
    }
    
    p(paste0("progress print for ", .x), class = "sticky")

  })
  
}, enable = T)

Is there a way to keep displaying the sticky messages in real-time while hiding the progress bar?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions