Class representing a Task published to Connect
ConnectTask.RdClass representing a Task published to Connect
Class representing a Task published to Connect
Usage
task <- ConnectTask$new(
guid = "1f6c9a82-0177-47fa-a27c-be090b39dca7",
trigger_rule = "always",
connect_server = connectapi::connect()
)
task$execute()Details
This class validates a published content item on Posit Connect, and allows the user to render the item programatically. Additionally, other tasks may be set as dependencies or dependents for the purposes of creating a DAG.
See also
Other R6 classes:
ConnectDAG,
SimTask
Public fields
guidThe guid of the content item published to Connect
nameThe name of the ContentItem on Connect
statusThe status of this task. Possible statuses: Pending, Succeeded, Failed, Skipped
trigger_ruleThe rule for when to run this task. See connect_task for details
upstream_tasksA list of ConnectTask R6 envs that are dependencies for this task
downstream_tasksA list of ConnectTask R6 envs that are dependents of this task
task_graphAn igraph object of this task, and its immediate upstream and downstream tasks
connect_serverAn Connect R6 env generated from connectapi::connect()
connect_content_itemA ContentItem R6 env generated from connectapi::content_item()
connect_variantA TaskVariant R6 env generated from connectapi::get_variant_default()
connect_renderingA VariantRender R6 env generated from connectapi::variant_render()
app_modeThe type of content being rendered on Posit Connect
Methods
Method new()
Initializes a new ConnectTask
Usage
ConnectTask$new(guid, trigger_rule = "all_success", connect_server)Arguments
guidA scalar character of the guid for the content deployed to Posit Connect
trigger_ruleA scalar character that defines state of dependency (upstream) tasks must be in to execute
connect_serverA connect environment with a connection to the Connect server
Method df_row()
Makes a single-row data.frame of this Task's details. Used by the ConnectDAG to create a data.frame of all linked tasks.
Method set_downstream()
Sets dependent tasks on this task
Method set_upstream()
Sets dependency tasks on this task
Method link_task()
Adds a single ConnectTask link either upstream or downstream. Should not be used directly. Called internally by the set_upstream and set_downstream methods.
Usage
ConnectTask$link_task(task, link = c("upstream_tasks", "downstream_tasks"))