Skip to content

Commit

Permalink
Stop earlier if all targets are up to date.
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Oct 9, 2018
1 parent 057d32e commit de44794
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions R/make.R
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,12 @@ make_imports <- function(config = drake::read_drake_config()){
#' })
#' }
make_targets <- function(config = drake::read_drake_config()){
up_to_date <- outdated(config, do_prework = FALSE, make_imports = FALSE) %>%
setdiff(x = config$all_targets)
outdated <- outdated(config, do_prework = FALSE, make_imports = FALSE)
if (!length(outdated)){
console_up_to_date(config = config)
return(config)
}
up_to_date <- setdiff(config$all_targets, outdated)
config$schedule <- targets_graph(config = config) %>%
igraph::delete_vertices(v = up_to_date)
config$jobs <- targets_setting(config$jobs)
Expand Down
2 changes: 1 addition & 1 deletion man/deps_code.Rd

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

0 comments on commit de44794

Please sign in to comment.