View source: R/tar_meta_sync.R
tar_meta_sync | R Documentation |
Synchronize metadata in a cloud bucket with metadata in the local data store.
tar_meta_sync(
meta = TRUE,
progress = TRUE,
process = TRUE,
crew = TRUE,
verbose = TRUE,
prefer_local = TRUE,
script = targets::tar_config_get("script"),
store = targets::tar_config_get("store")
)
meta |
Logical of length 1, whether to process the main metadata file
at |
progress |
Logical of length 1, whether to process the progress file at
|
process |
Logical of length 1, whether to process the process file at
|
crew |
Logical of length 1, whether to process the |
verbose |
Logical of length 1, whether to print informative console messages. |
prefer_local |
Logical of length 1 to control which copy of each
metadata file takes precedence if the local hash and cloud hash
are different but the time stamps are the same. Set to |
script |
Character of length 1, path to the
target script file. Defaults to |
store |
Character of length 1, path to the
|
tar_meta_sync()
synchronizes the local and cloud copies
of all the metadata files of the pipeline so that both have the
most recent copy. For each metadata file,
if the local file does not exist or is older than the cloud file,
then the cloud file is downloaded to the local file path.
Conversely, if the cloud file is older or does not exist, then the local
file is uploaded to the cloud. If the time stamps of these files are
equal, use the prefer_local
argument to determine
which copy takes precedence.
Other metadata:
tar_meta()
,
tar_meta_delete()
,
tar_meta_download()
,
tar_meta_upload()
if (identical(Sys.getenv("TAR_EXAMPLES"), "true")) { # for CRAN
tar_dir({ # tar_dir() runs code from a temp dir for CRAN.
tar_script({
library(targets)
library(tarchetypes)
tar_option_set(
resources = tar_resources(
aws = tar_resources_aws(
bucket = "YOUR_BUCKET_NAME",
prefix = "YOUR_PROJECT_NAME"
)
),
repository = "aws"
)
list(
tar_target(x, data.frame(x = seq_len(2), y = seq_len(2)))
)
}, ask = FALSE)
tar_make()
tar_meta_sync()
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.