rrq_task_create_bulk_call | R Documentation |
Create a bulk set of tasks based on applying a function over a vector or data.frame. This is the bulk equivalent of rrq_task_create_call, in the same way that rrq_task_create_bulk_expr is a bulk version of rrq_task_create_expr.
rrq_task_create_bulk_call(
fn,
data,
args = NULL,
queue = NULL,
separate_process = FALSE,
timeout_task_run = NULL,
depends_on = NULL,
controller = NULL
)
fn |
The function to call |
data |
The data to apply the function over. This can be a
vector or list, in which case we act like |
args |
Additional arguments to |
queue |
The queue to add the task to; if not specified the "default" queue (which all workers listen to) will be used. If you have configured workers to listen to more than one queue you can specify that here. Be warned that if you push jobs onto a queue with no worker, it will queue forever. |
separate_process |
Logical, indicating if the task should be
run in a separate process on the worker. If |
timeout_task_run |
Optionally, a maximum allowed running
time, in seconds. This parameter only has an effect if
|
depends_on |
Vector or list of IDs of tasks which must have completed before this job can be run. Once all dependent tasks have been successfully run, this task will get added to the queue. If the dependent task fails then this task will be removed from the queue. |
controller |
The controller to use. If not given (or |
A vector of task identifiers; this will have the length as
data
has rows if it is a data.frame
, otherwise it has the
same length as data
obj <- rrq_controller("rrq:example")
d <- data.frame(n = 1:10, lambda = rgamma(10, 5))
ts <- rrq_task_create_bulk_call(rpois, d, controller = obj)
rrq_task_wait(ts, controller = obj)
rrq_task_results(ts, controller = obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.