| orderly_runner_ | R Documentation |
Object for managing running jobs on the redis queue
Object for managing running jobs on the redis queue
rootOrderly root
configOrderly config
allow_refAllow git to change branch/ref for run
default_branchDefault git branch
conRedis connection
cleanup_on_exitIf TRUE workers are killed on exit
queueThe redis queue
queue_idRedis queue ID
keysSet of redis keys for mapping between key, report_id and task_id
new()Create object, read configuration and setup redis connection.
orderly_runner_$new( root, identity, queue_id, workers, cleanup_on_exit = workers > 0, worker_timeout = Inf )
rootOrderly root.
identityRemote identity, as listed in orderly_config.yml
queue_idID of an existing queue to connect to, creates a new one if NULL.
workersNumber of workers to spawn.
cleanup_on_exitIf TRUE workers are killed on exit.
worker_timeoutHow long worker should live for before it is killed. Expect this is only finite during local testing.
start_workers()Start n workers for this queue and optionally set a timeout.
orderly_runner_$start_workers(workers, timeout)
workersNumber of workers to spawn.
timeoutHow long worker should live for before it is killed. Expect this is only finite during local testing.
TRUE, called for side effects.
assert_ref_switching_allowed()Check if ref switching is allowed in this runner. Errors if ref is non NULL and ref switching disallowed, otherwise does nothing.
orderly_runner_$assert_ref_switching_allowed(ref)
refInput ref to check
TRUE, called for side effects.
submit_task_report()Queue a job to run an orderly report.
orderly_runner_$submit_task_report( name, parameters = NULL, ref = NULL, instance = NULL, changelog = NULL, poll = 0.1, timeout = 60 * 60 * 3, depends_on = NULL )
nameName of report to be queued.
parametersList of parameters to pass to report.
refThe git sha to run the report.
instanceThe db instance for the report to pull data from.
changelogDescription of changes to the report.
pollHow frequently to poll for the report ID being available.
timeoutTimeout for the report run default 3 hours.
depends_onKeys of any tasks which this report depends on
The key for the job, note this is not the task id. The task id can be retrieved from redis using the key.
submit()Submit an arbitrary job on the queue
orderly_runner_$submit(expr, depends_on = NULL)
exprA quoted R expression.
depends_onTask ids for any dependencies of this job.
Task id
submit_workflow()Queue a workflow.
orderly_runner_$submit_workflow( reports, ref = NULL, changelog = NULL, poll = 0.1, timeout = 60 * 60 * 3 )
reportsDetails of reports to be run.
refThe git sha to run the workflow.
changelogDescription of changes to the reports - applied to all reports.
pollHow frequently to poll for the report ID being available. Applied to each of the reports run in the workflow
timeoutTimeout for each of the reports run as part of the workflow default 3 hours.
The key for the workflow and each individual report
status()Get the status of a job
orderly_runner_$status(key, output = FALSE)
keyThe job key.
outputIf TRUE include the output from job running.
List containing the key, status, report_id (if available), output and the position of the job in the queue.
workflow_status()Get the status of a workflow.
orderly_runner_$workflow_status(workflow_key, output = FALSE)
workflow_keyThe workflow key.
outputIf TRUE include the output from each job in the workflow.
List containing the workflow_key, status and status of each job in the workflow.
queue_status()Get the running and queued tasks in front of key in the queue.
If key is NULL then includes all queued tasks.
orderly_runner_$queue_status(key = NULL)
keyThe job key, if NULL returns all queued tasks.
List containing the key, status and report name of any running tasks and any queued tasks in front of key in the queue.
check_timeout()Check if any running tasks have passed their timeouts. This is run by the API on a preroute - we check for timeouts everytime someone interacts with the API. Not intended to be run directly.
orderly_runner_$check_timeout()
List of killed reports.
kill()Kill a job
orderly_runner_$kill(key)
keyThe job key.
destroy()Destroy the queue. Not expected to be called directly, used in tests.
orderly_runner_$destroy()
cleanup()Cleanup workers and destroy the queue. Not expected to be called directly, gets registered as finaliser of the object.
orderly_runner_$cleanup()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.