Run a report on a remote server. Note that this is only supported for remotes using OrderlyWeb at present.
Usage
orderly_run_remote(
name,
parameters = NULL,
ref = NULL,
timeout = NULL,
wait = 3600,
poll = 1,
open = TRUE,
stop_on_error = TRUE,
stop_on_timeout = TRUE,
progress = TRUE,
root = NULL,
locate = TRUE,
instance = NULL,
remote = NULL
)
Arguments
- name
Name of the report
- parameters
Parameters for the report
- ref
Optional reference, indicating which branch should be used. This cannot be used if the remote has
default_branch_only
set.- timeout
Time to tell the server to wait before killing the report.
- wait
Time to wait for the report to be run; if the report takes longer than this time to run but
timeout
is longer it will remain running on the server but we will stop waiting for it and instead throw an error.- poll
Period to poll the server for results (in seconds)
- open
Logical, indicating if the report should be opened in a browser on completion (if supported by the remote)
- stop_on_error
Logical, indicating if we should throw an error if the report fails. If you set this to
FALSE
it will be much easier to debug, but more annoying in scripts. If the report times out on the server (i.e., takes longer thantimeout
) that counts as an error.- stop_on_timeout
Logical, indicating if we should throw an error if the report takes longer than
wait
seconds to complete.- progress
Logical, indicating if a progress spinner should be included.
- root
The path to an orderly root directory, or
NULL
(the default) to search for one from the current working directory iflocate
isTRUE
.- locate
Logical, indicating if the configuration should be searched for. If
TRUE
andconfig
is not given, then orderly looks in the working directory and up through its parents until it finds anorderly_config.yml
file.- instance
Select instance of the source database to be used, where multiple instances are configured. Use a single unnamed character string to indicate an instance to match. Will use default if NULL.
- remote
Description of the location. Typically this is a character string indicating a remote specified in the
remotes
block of yourorderly_config.yml
. It is also possible to pass in a directly created remote object (e.g., usingorderly_remote_path()
, or one provided by another package). If leftNULL
, then the default remote for this orderly repository is used - by default that is the first listed remote.
Examples
path_remote <- orderly::orderly_example("demo")
path_local <- orderly::orderly_example("demo")
remote <- orderly::orderly_remote_path(path_remote)
# Currently, path remotes don't support run
try(orderly::orderly_run_remote(
"minimal", remote = remote, root = path_local))
#> Error in remote$run(name, parameters = parameters, ref = ref, timeout = timeout, :
#> 'orderly_remote_path' remotes do not run