Get the result for a single task (see rrq_task_results for a method for efficiently getting multiple results at once). Returns the value of running the task if it is complete, and an error otherwise.
rrq_task_result(task_id, error = FALSE, follow = NULL, controller = NULL)
The single id for which the result is wanted.
Logical, indicating if we should throw an error if a
task was not successful. By default (error = FALSE
), in the
case of the task result returning an error we return an object
of class rrq_task_error
, which contains information about the
error. Passing error = TRUE
calls stop()
on this error if it
is returned.
Optional logical, indicating if we should follow any
redirects set up by doing rrq_task_retry. If not given, falls
back on the value passed into the controller, the global option
rrq.follow
, and finally TRUE
. Set to FALSE
if you want to
return information about the original task, even if it has been
subsequently retried.
The controller to use. If not given (or NULL
)
we'll use the controller registered with
rrq_default_controller_set()
.
The result of your task