man-roxygen/task_bundle_methods.R

##' @section Methods:
##'
##' \describe{
##' \item{\code{ids}}{
##'   Return the vector of ids for the bundle (will return \code{character(0)} if the bundle is empty).
##'
##'   \emph{Usage:}
##'   \code{ids()}
##' }
##' \item{\code{status}}{
##'   Fetch the current task status (see \code{\link{task}}).
##'
##'   \emph{Usage:}
##'   \code{status(follow_redirect = FALSE)}
##'
##'   \emph{Arguments:}
##'   \describe{
##'     \item{\code{follow_redirect}}{
##'       should we follow redirects to get the status of any requeued task?
##'     }
##'   }
##' }
##' \item{\code{overview}}{
##'   High-level overview of the tasks in the bundle; the number of tasks in each status.
##'
##'   \emph{Usage:}
##'   \code{overview()}
##' }
##' \item{\code{results}}{
##'   Fetch results for all tasks, immediately (unlike \code{wait}).
##'
##'   \emph{Usage:}
##'   \code{results(follow_redirect = FALSE)}
##'
##'   \emph{Arguments:}
##'   \describe{
##'     \item{\code{follow_redirect}}{
##'       should we follow redirects to get the status of any requeued task?
##'     }
##'   }
##'
##'   \emph{Value}:
##'
##'   Always returns a list, regardless of how many tasks are in the bundle \code{list()} for zero tasks, \code{list(x1)} for one task, \code{list(x1, x2)} for two, etc).  This list will be named with the ids (see \code{ids()}) unless the bundles has a \code{names} attribute that has not been invalidated by using \code{update_groups()} (this interface may change).
##' }
##' \item{\code{wait}}{
##'   Like \code{results}, but block until results are returned.
##'
##'   \emph{Usage:}
##'   \code{wait(timeout = 60, time_poll = 1, progress_bar = TRUE, follow_redirect = FALSE)}
##'
##'   \emph{Arguments:}
##'   \describe{
##'     \item{\code{timeout}}{
##'
##'       Total time to wait, in seconds.  If the tasks have not returned by this point an error willl be thrown.
##'     }
##'
##'     \item{\code{time_poll}}{
##'
##'       Interval, in seconds, to poll for new results.  Increasing this time will reduce the number of Redis roundtrips but decrease the responsiveness to an interrupt.
##'     }
##'
##'     \item{\code{progress_bar}}{
##'
##'       Display a progress bar while waiting?  Includes a spinner for reassurance that the process has not died.
##'     }
##'
##'     \item{\code{follow_redirect}}{
##'       should we follow redirects to get the status of any requeued task?
##'     }
##'   }
##' }
##' \item{\code{wait1}}{
##'
##'   Wait for a single task to complete,a nd return its result.
##'
##'   \emph{Usage:}
##'   \code{wait1(timeout = 60, time_poll = 1, follow_redirect = FALSE)}
##'
##'   \emph{Arguments:}
##'   \describe{
##'     \item{\code{timeout}}{
##'
##'       Total time to wait, in seconds.  If the tasks have not returned by this point an error willl be thrown.
##'     }
##'
##'     \item{\code{time_poll}}{
##'
##'       Interval, in seconds, to poll for new results.  Increasing this time will reduce the number of Redis roundtrips but decrease the responsiveness to an interrupt.
##'     }
##'
##'     \item{\code{follow_redirect}}{
##'       should we follow redirects to get the status of any requeued task?
##'     }
##'   }
##'
##'   \emph{Value}:
##'
##'   If a task as available, either because all tasks are complete or because the waiting time was too short, \code{NULL} is returned. Otherwise a list of length 2 is returned, with elements \code{id} (the id of the task that completed) and \code{value} the value of that that task.  This interface is inspired by Redis' \code{BLPOP} operation.
##' }
##' \item{\code{times}}{
##'   Like times in \code{\link{observer}}, but limited to the ids in the bundle.
##'
##'   \emph{Usage:}
##'   \code{times(unit_elapsed = "secs")}
##'
##'   \emph{Arguments:}
##'   \describe{
##'     \item{\code{unit_elapsed}}{
##'       Unit to use in computing elapsed times.  The default is to use "secs".  This is passed through to \code{\link{difftime}} so the units there are available and are "auto", "secs", "mins", "hours", "days", "weeks".
##'     }
##'   }
##' }
##' \item{\code{update_groups}}{
##'
##'   Check for new tasks that have been added to the groups included in this bunddle and add these tasks to the bundle.
##'
##'   \emph{Usage:}
##'   \code{update_groups()}
##'
##'   \emph{Value}:
##'
##'   Invisibly, the ids of tasks that have been added to the bundle.
##' }
##' }
traitecoevo/rrqueue documentation built on May 31, 2019, 7:44 p.m.