task(obj, task_id, key_complete = NULL)
queue or observer object.key_complete,
otherwise we look it up on creation.Create a task handle object. This is a "pointer" to a task and
can be used to retrieve information about status, running times,
expression and the result of the task once complete. Generally
you do not need to make a task object as they will be created for
you by things like the task_get method of the
observer and queue objects.
Tasks have a unique identifier; these are unique within a queue and are implemented as an incrementing integer. However, this is an implementation detail and should not be relied on. The identifier is represented as a character string rather than an integer in most places.
Tasks exist in one of a number of statuses. See the
status method below for a list of possible statuses and
their interpretation.
statusUsage:
status(follow_redirect = FALSE)
Arguments:
follow_redirectValue: Scalar character. Possible values are
PENDINGRUNNINGCOMPLETEERRORORPHANREDIRECTMISSINGresultUsage:
result(follow_redirect = FALSE, sanitise = FALSE)
Arguments:
follow_redirectsanitiseIf the task is not yet complete or is missing, return an UnfetchabmeTask object rather than throwing an error.
waitresult, but will wait until the task is complete. In order to preserve the key_complete for anything that might be listening for it (and to avoid collision with anything else writing to that key), this function repeatedly polls the database. Over a slow connection you may want to increase the every parameter.
Usage:
wait(timeout = , every = 0.05)
Arguments:
timeouteveryexprUsage:
expr(locals = FALSE)
Arguments:
localsTRUE, then local variables used in the expression will be returned in a attribute of the expression envir.
Value:
A quoted expression (a language object). Turn this into a string with deparse. If locals was TRUE there will be an environment attribute with local variables included.
envirUsage:
envir()
timesUsage:
times(unit_elapsed = "secs")
Arguments:
unit_elapseddifftime so the units there are available and are "auto", "secs", "mins", "hours", "days", "weeks".
Value:
A one row data.frame with columns
submittedstartedNA if waitingfinishedNA
if waiting or runningwaitingrunningNA if waitingidleNA
if waiting or running