tests/hpc/test-future_error.R

library(targets)
tar_script({
  future::plan(future.callr::callr)
  list(
    tar_target(x, Sys.sleep(400), error = "continue"),
    tar_target(y, x)
  )
})
tar_make_future()
# Terminate the worker.
# Target y should start and target x should show a callr error message:
tar_meta(x, error)$error

Try the targets package in your browser

Any scripts or data that you put into this service are public.

targets documentation built on Oct. 12, 2023, 5:07 p.m.