storr
-related errors.R/clean.R
Sometimes, storr
caches may have
dangling orphaned files that prevent you from loading or cleaning.
This function tries to remove those files so you can use the
cache normally again.
rescue_cache(targets = NULL, path = getwd(), search = TRUE, verbose = drake::default_verbose(), force = FALSE, cache = drake::get_cache(path = path, search = search, verbose = verbose, force = force), jobs = 1, garbage_collection = FALSE)
targets | Character vector, names of the targets to rescue.
As with many other drake utility functions, the word |
---|---|
path | Root directory of the drake project,
or if |
search | logical. If |
verbose | logical or numeric, control printing to the console.
Use
|
force | logical, whether to load the cache despite any back compatibility issues with the running version of drake. |
cache | a |
jobs | number of jobs for light parallelism (disabled on Windows) |
garbage_collection | logical, whether to do garbage collection
as a final step. See |
The rescued drake/storr cache.
get_cache()
, cached()
,
drake_gc()
, clean()
# NOT RUN { test_with_dir("Quarantine side effects.", { load_basic_example() # Get the code with drake_example("basic"). make(my_plan) # Run the project, build targets. This creates the cache. # Remove dangling cache files that could cause errors. rescue_cache(jobs = 2) # Alternatively, just rescue targets 'small' and 'large'. # Rescuing specific targets is usually faster. rescue_cache(targets = c("small", "large")) }) # }