Returns the last (few) elements in the worker log, in a programmatically useful format (see Value).
Source:R/rrq_workers.R
rrq_worker_log_tail.Rd
Returns the last (few) elements in the worker log, in a programmatically useful format (see Value).
Arguments
- worker_ids
Optional vector of worker ids. If
NULL
then all active workers are used.- n
Number of elements to select, the default being the single last entry. Use
Inf
or0
to indicate that you want all log entries- controller
The controller to use. If not given (or
NULL
) we'll use the controller registered withrrq_default_controller_set()
.
Value
A data.frame with columns:
worker_id
: the worker idchild
: the process id, an integer, where logs come from a child process from a task queued withseparate_process = TRUE
time
: the time from Redis when the event happened; see redux::redis_time to convert this to an R timecommand
: the command sent from or to the workermessage
: the message corresponding to that command
Examples
if (FALSE) { # rrq:::enable_examples(require_queue = "rrq:example")
obj <- rrq_controller("rrq:example")
rrq_worker_log_tail(n = 10, controller = obj)
}