observer(queue_name, redis_host = "127.0.0.1", redis_port = 6379, config = NULL)
Creates an observer for an rrqueue. This is the "base class" for
a couple of different objects in rrqueue; notably the
queue object. So any method listed here also works
within queue objects.
Most of the methods of the observer object are extremely
simple and involve fetching information from the database about
the state of tasks, environments and workers.
The method and argument names try to give hints about the sort of
things they expect; a method asking for task_id expects a
single task identifier, while those asking for task_ids
expect a vector of task identifiers (and if they have a default
NULL then will default to returning information for
all task identifiers). Similarly, a method starting
task_ applies to one task while a method starting
tasks_ applies to multiple.
tasks_listUsage:
tasks_list()
Value: A character vector
tasks_statusUsage:
tasks_status(task_ids = NULL, follow_redirect = FALSE)
Arguments:
task_idsfollow_redirectValue: A named character vector; the names will be the task ids, and the values are the status of each task. Possible status values are
PENDINGRUNNINGCOMPLETEERRORORPHANREDIRECTMISSINGtasks_overviewUsage:
tasks_overview()
tasks_timesUsage:
tasks_times(task_ids = NULL, unit_elapsed = "secs")
Arguments:
task_idsunit_elapseddifftime so the units there are available and are "auto", "secs", "mins", "hours", "days", "weeks".
Value:
A data.frame, one row per task, with columns
submittedstartedNA if waitingfinishedNA
if waiting or runningwaitingrunningNA if waitingidleNA
if waiting or runningThe row names of the data.frame will be the task ids.
tasks_envirUsage:
tasks_envir(task_ids = NULL)
Arguments:
task_idsValue: A named character vector; names are the task ids and the value is the environment id associated with that task.
task_gettask object associated with a given task identifier. This can be used to interrogate an individual task. See the help for task objects for more about these objects.
Usage:
task_get(task_id = )
Arguments:
task_idtask_resultUsage:
task_result(task_id = , follow_redirect = FALSE, sanitise = FALSE)
Arguments:
task_idfollow_redirectsanitiseUnfetchabmeTask object rather than throwing an error.
tasks_groups_listtasks_set_group method of link{queue}.
Usage:
tasks_groups_list()
tasks_in_groupsUsage:
tasks_in_groups(groups = )
Arguments:
groupstasks_groups_list to get a list of valid groups).
tasks_lookup_groupUsage:
tasks_lookup_group(task_ids = NULL)
Arguments:
task_idsValue:
A named character vector; names refer to task ids and the value is the group (or NA if no group is set for that task id).
task_bundle_gettask_bundle
Usage:
task_bundle_get(groups = NULL, task_ids = NULL)
Arguments:
groupstask_idstask_ids here, only one of groups or task_ids can be provided, so if task_ids=NULL then task_ids is ignored and groups is used.
envirs_listUsage:
envirs_list()
envirs_contentsUsage:
envirs_contents(envir_ids = NULL)
Arguments:
envir_idsValue: A list, each element of which is a list of elements
packagessourcessource_filesenvir_workersUsage:
envir_workers(envir_id = , worker_ids = NULL)
Arguments:
envir_idworker_idsValue:
A named logical vector; TRUE if a worker can use an environment, named by the worker identifers.
workers_lenUsage:
workers_len()
workers_listUsage:
workers_list()
workers_list_exitedUsage:
workers_list_exited()
workers_statusUsage:
workers_status(worker_ids = NULL)
Arguments:
worker_idsValue: A named character vector; the names will be the task ids, and the values are the status of each task. Possible status values are
IDLEBUSYLOSTworkers_timesRedisHeartbeat package.
Usage:
workers_times(worker_ids = NULL, unit_elapsed = "secs")
Arguments:
worker_idsunit_elapseddifftime so the units there are available and are "auto", "secs", "mins", "hours", "days", "weeks".
Value:
A data.frame, one row per worker, with columns
worker_idexpire_maxexpirelast_seenlast_actionworkers_log_tailUsage:
workers_log_tail(worker_ids = NULL, n = 1)
Arguments:
worker_idsn0 or Inf to return all entries.
Value:
A data.frame with columns
worker_idtimecommandmessageworkers_infoINFO command. This is registered at startup and after recieving a INFO message from a queue object. So the information may be out of date.
Usage:
workers_info(worker_ids = NULL)
Arguments:
worker_idsValue:
A list, each element of which is a worker_info
worker_envirworkers_info that might be out of date.
Usage:
worker_envir(worker_id = )
Arguments:
worker_id