Skip to content

Commit

Permalink
avoid duplicated loads
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Nov 10, 2024
1 parent 425a7f4 commit 51d062a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions R/class_builder.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ target_prepare.tar_builder <- function(
progress = scheduler$progress,
pending = pending
)
target_ensure_deps_main(target, pipeline)
if (identical(target$settings$retrieval, "main")) {
target_ensure_deps_main(target, pipeline)
}
builder_update_subpipeline(target, pipeline)
}

Expand Down Expand Up @@ -138,7 +140,9 @@ target_run.tar_builder <- function(target, envir, path_store) {
}
on.exit(builder_unset_tar_runtime(), add = TRUE)
on.exit(target$subpipeline <- NULL, add = TRUE)
target_ensure_deps_worker(target, target$subpipeline)
if (identical(target$settings$retrieval, "worker")) {
target_ensure_deps_worker(target, target$subpipeline)
}
frames <- frames_produce(envir, target, target$subpipeline)
builder_set_tar_runtime(target, frames)
store_update_stage_early(
Expand Down

0 comments on commit 51d062a

Please sign in to comment.